UX: puts back share-panel as floating pane on post actions (#7066)

This commit is contained in:
Joffrey JAFFEUX
2019-02-26 14:15:25 +01:00
committed by GitHub
parent 6ea9f5c9c5
commit d04c4bf8e7
14 changed files with 367 additions and 186 deletions

View File

@@ -0,0 +1,16 @@
import componentTest from "helpers/component-test";
moduleForComponent("share-button", { integration: true });
componentTest("share button", {
template: '{{share-button url="https://eviltrout.com"}}',
test(assert) {
assert.ok(find(`button.share`).length, "it has all the classes");
assert.ok(
find('button[data-share-url="https://eviltrout.com"]').length,
"it has the data attribute for sharing"
);
}
});

View File

@@ -0,0 +1,13 @@
import Button from "discourse/components/d-button";
export default Button.extend({
classNames: ["btn-default", "share"],
icon: "link",
title: "topic.share.help",
label: "topic.share.title",
attributeBindings: ["url:data-share-url"],
click() {
return true;
}
});