mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 06:52:41 +08:00
UX: improve table hover states, fix table button margin issue (#30585)
This commit is contained in:
parent
3dfe1a9fda
commit
116c3f7f8d
|
@ -119,7 +119,7 @@ export default {
|
||||||
"btn-default",
|
"btn-default",
|
||||||
"btn",
|
"btn",
|
||||||
"btn-icon",
|
"btn-icon",
|
||||||
...(props.label ? ["no-text"] : []),
|
...(props.label ? [] : ["no-text"]),
|
||||||
];
|
];
|
||||||
|
|
||||||
openPopupBtn.classList.add(...defaultClasses);
|
openPopupBtn.classList.add(...defaultClasses);
|
||||||
|
@ -197,7 +197,6 @@ export default {
|
||||||
const tableEditorBtn = _createButton({
|
const tableEditorBtn = _createButton({
|
||||||
classes: ["btn-edit-table"],
|
classes: ["btn-edit-table"],
|
||||||
title: "table_builder.edit.btn_edit",
|
title: "table_builder.edit.btn_edit",
|
||||||
label: "table_builder.edit.btn_edit",
|
|
||||||
icon: {
|
icon: {
|
||||||
name: "pencil",
|
name: "pencil",
|
||||||
class: "edit-table-icon",
|
class: "edit-table-icon",
|
||||||
|
@ -208,6 +207,7 @@ export default {
|
||||||
table.parentNode.classList.add("fullscreen-table-wrapper");
|
table.parentNode.classList.add("fullscreen-table-wrapper");
|
||||||
|
|
||||||
if (attrs.canEdit) {
|
if (attrs.canEdit) {
|
||||||
|
table.parentNode.classList.add("--editable");
|
||||||
buttonWrapper.append(tableEditorBtn);
|
buttonWrapper.append(tableEditorBtn);
|
||||||
tableEditorBtn.addEventListener(
|
tableEditorBtn.addEventListener(
|
||||||
"click",
|
"click",
|
||||||
|
@ -229,6 +229,8 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.parentNode.classList.add("--has-overflow");
|
||||||
|
|
||||||
const expandTableBtn = _createButton({
|
const expandTableBtn = _createButton({
|
||||||
classes: ["btn-expand-table"],
|
classes: ["btn-expand-table"],
|
||||||
title: "fullscreen_table.expand_btn",
|
title: "fullscreen_table.expand_btn",
|
||||||
|
|
|
@ -1596,12 +1596,16 @@ iframe {
|
||||||
|
|
||||||
html.discourse-no-touch .fullscreen-table-wrapper:hover {
|
html.discourse-no-touch .fullscreen-table-wrapper:hover {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 2px 5px 0 rgba(var(--always-black-rgb), 0.1),
|
|
||||||
0 2px 10px 0 rgba(var(--always-black-rgb), 0.1);
|
|
||||||
|
|
||||||
.open-popup-link {
|
.open-popup-link {
|
||||||
opacity: 100%;
|
opacity: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.--has-overflow,
|
||||||
|
&.--editable {
|
||||||
|
box-shadow: 0 2px 5px 0 rgba(var(--always-black-rgb), 0.1),
|
||||||
|
0 2px 10px 0 rgba(var(--always-black-rgb), 0.1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.read-state {
|
.read-state {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user