Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
10 KB
Referenced Files
None
Subscribers
None
diff --git a/changelog.d/action-button-extra-counter.add b/changelog.d/action-button-extra-counter.add
new file mode 100644
index 0000000000..7d5c77447b
--- /dev/null
+++ b/changelog.d/action-button-extra-counter.add
@@ -0,0 +1 @@
+Display counter for status action buttons when they are on the menu
diff --git a/changelog.d/bookmark-button-align.fix b/changelog.d/bookmark-button-align.fix
new file mode 100644
index 0000000000..64bc2c807b
--- /dev/null
+++ b/changelog.d/bookmark-button-align.fix
@@ -0,0 +1 @@
+Fix bookmark button alignment in the extra actions menu
diff --git a/src/components/popover/popover.scss b/src/components/popover/popover.scss
index 828b81cd14..a166e21966 100644
--- a/src/components/popover/popover.scss
+++ b/src/components/popover/popover.scss
@@ -1,140 +1,143 @@
.popover-trigger-button {
display: inline-block;
}
.popover {
z-index: var(--ZI_popover_override, var(--ZI_popovers));
position: fixed;
min-width: 0;
max-width: calc(100vw - 20px);
--_shadow: var(--shadow);
}
.popover-default {
&::after {
content: "";
position: absolute;
inset: -1px;
box-shadow: var(--_shadow);
pointer-events: none;
}
border-radius: var(--roundness);
border-color: var(--border);
border-style: solid;
border-width: 1px;
background-color: var(--background);
}
.dropdown-menu {
display: block;
padding: 0;
font-size: 1em;
text-align: left;
list-style: none;
max-width: 100vw;
z-index: var(--ZI_popover_override, var(--ZI_popovers));
white-space: nowrap;
background-color: var(--background);
.dropdown-divider {
height: 0;
margin: 0.5rem 0;
overflow: hidden;
border-top: 1px solid var(--border);
}
.dropdown-item {
padding: 0;
display: grid;
grid-template-columns: 1fr;
grid-auto-flow: column;
grid-auto-columns: auto;
grid-gap: 0.5em;
.popover-wrapper {
box-sizing: border-box;
display: grid;
grid-template-columns: 1fr;
}
.extra-button {
- border-left: 1px solid var(--icon);
+ border-left: 1px solid;
+ border-image-source: linear-gradient(to bottom, transparent 0%, var(--icon) var(--__horizontal-gap) calc(100% - var(--__horizontal-gap)), transparent 100%);
+ border-image-slice: 1;
padding-left: calc(var(--__horizontal-gap) - 1px);
- border-right: var(--__horizontal-gap) solid transparent;
- border-top: var(--__horizontal-gap) solid transparent;
- border-bottom: var(--__horizontal-gap) solid transparent;
+ padding-right: var(--__horizontal-gap);
+ padding-top: var(--__horizontal-gap);
+ padding-bottom: var(--__horizontal-gap);
+ max-width: fit-content;
}
.main-button {
width: 100%;
padding: var(--__horizontal-gap) var(--__horizontal-gap);
grid-gap: var(--__horizontal-gap);
grid-template-columns: 1fr var(--__line-height);
grid-auto-flow: column;
grid-auto-columns: auto;
.menu-checkbox {
display: inline-block;
vertical-align: middle;
min-width: calc(var(--__line-height) + 1px);
max-width: calc(var(--__line-height) + 1px);
min-height: calc(var(--__line-height) + 1px);
max-height: calc(var(--__line-height) + 1px);
line-height: var(--__line-height);
text-align: center;
border-radius: 0;
box-shadow: var(--shadow);
margin-right: var(--__horizontal-gap);
&.menu-checkbox-checked::after {
font-size: 1.25em;
content: "✓";
}
&.-radio {
border-radius: 9999px;
&.menu-checkbox-checked::after {
font-size: 2em;
content: "•";
}
}
}
}
.main-button,
.extra-button {
display: grid;
box-sizing: border-box;
align-items: center;
&.disabled {
cursor: not-allowed;
}
&:not(.disabled) {
cursor: pointer;
}
}
&.-icon {
.main-button {
grid-template-columns: var(--__line-height) 1fr;
}
}
&.-icon-space {
.main-button {
padding-left: calc(var(--__line-height) + var(--__horizontal-gap) * 2);
}
}
&.-icon-double {
.main-button {
grid-template-columns: var(--__line-height) var(--__line-height) 1fr;
}
}
}
}
diff --git a/src/components/status_action_buttons/action_button.scss b/src/components/status_action_buttons/action_button.scss
index c0a9824dff..8c69248713 100644
--- a/src/components/status_action_buttons/action_button.scss
+++ b/src/components/status_action_buttons/action_button.scss
@@ -1,105 +1,121 @@
@use "../../mixins";
/* stylelint-disable declaration-no-important */
.quick-action {
justify-content: space-between;
display: flex;
align-items: baseline;
align-items: center;
height: 1.5em;
.action-counter {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 1em;
}
.action-button-inner,
.extra-button {
margin: -0.5em;
padding: 0.5em;
}
.separator {
display: block;
align-self: stretch;
width: 1px;
background-color: var(--icon);
margin-left: 1em;
margin-right: 0.5em;
}
&.-pin {
margin: calc(-2px - 0.25em);
padding: 0.25em;
border: 2px dashed var(--icon);
border-radius: var(--roundness);
grid-template-columns: minmax(max-content, 1fr) auto;
.chevron-icon,
.extra-button,
.separator {
display: none;
}
}
.action-button-inner {
display: grid;
grid-gap: 1em;
grid-template-columns: max-content;
grid-auto-flow: column;
grid-auto-columns: max-content;
align-items: center;
@include mixins.unfocused-style {
.focus-marker {
visibility: hidden;
}
.active-marker {
visibility: visible;
}
}
@include mixins.focused-style {
.focus-marker {
visibility: visible;
}
.active-marker {
visibility: hidden;
}
}
}
}
.action-button {
display: grid;
grid-auto-flow: column;
align-items: center;
padding: 0;
.action-button-inner {
&:hover,
&.-active {
&.reply-button:not(.disabled) {
.svg-inline--fa {
color: var(--cBlue);
}
}
&.retweet-button:not(.disabled) {
.svg-inline--fa {
color: var(--cGreen);
}
}
&.favorite-button:not(.disabled) {
.svg-inline--fa {
color: var(--cOrange);
}
}
}
}
+
+ &.-extra {
+ .action-counter {
+ justify-self: end;
+ margin-right: 1em;
+ }
+
+ .chevron-icon {
+ justify-self: end;
+ }
+
+ .extra-button {
+ justify-self: end;
+ justify-content: end;
+ }
+ }
}
diff --git a/src/components/status_action_buttons/action_button.vue b/src/components/status_action_buttons/action_button.vue
index ad2d349c64..a9aedb9e3c 100644
--- a/src/components/status_action_buttons/action_button.vue
+++ b/src/components/status_action_buttons/action_button.vue
@@ -1,109 +1,109 @@
<template>
<div
class="action-button"
:class="buttonClass"
>
<component
:is="getComponent(button)"
class="action-button-inner"
:class="buttonInnerClass"
role="menuitem"
type="button"
:title="$t(button.label(funcArg))"
target="_blank"
:tabindex="0"
:disabled="button.interactive ? !button.interactive(funcArg) : false"
:href="getComponent(button) == 'a' ? button.link?.(funcArg) || remoteInteractionLink : undefined"
@click="doActionWrap(button, outerClose)"
>
<FALayers>
<FAIcon
class="fa-scale-110"
:icon="button.icon(funcArg)"
:spin="!extra && getComponent(button) == 'button' && button.animated?.() && animationState"
:style="{ '--fa-animation-duration': '750ms' }"
fixed-width
/>
<template v-if="!buttonClass.disabled && (!button.interactive || button?.interactive(funcArg)) && button.toggleable?.(funcArg) && button.active">
<FAIcon
v-if="button.active(funcArg)"
class="active-marker"
transform="shrink-6 up-9 right-15"
:icon="button.activeIndicator?.(funcArg) || 'check'"
/>
<FAIcon
v-if="!button.active(funcArg)"
class="focus-marker"
transform="shrink-6 up-9 right-15"
:icon="button.openIndicator?.(funcArg) || 'plus'"
/>
<FAIcon
v-else
class="focus-marker"
transform="shrink-6 up-9 right-15"
:icon="button.closeIndicator?.(funcArg) || 'minus'"
/>
</template>
</FALayers>
<span
v-if="extra"
class="action-label"
>
{{ $t(button.label(funcArg)) }}
</span>
<FAIcon
v-if="button.dropdown?.()"
class="chevron-icon"
size="lg"
:icon="extra ? 'chevron-right' : 'chevron-up'"
fixed-width
/>
</component>
<span
- v-if="!extra && button.counter?.(funcArg) > 0"
+ v-if="button.counter?.(funcArg) > 0"
class="action-counter"
>
{{ button.counter?.(funcArg) }}
</span>
<span
v-if="!extra && button.name === 'bookmark'"
class="separator"
/>
<Popover
v-if="button.name === 'bookmark'"
:trigger="extra ? 'hover' : 'click'"
:placement="extra ? 'right' : 'top'"
:offset="extra ? { x: 10 } : { y: 10 }"
:trigger-attrs="{ class: 'extra-button' }"
>
<template #trigger>
<FAIcon
class="chevron-icon"
size="lg"
:icon="extra ? 'chevron-right' : 'chevron-up'"
fixed-width
/>
</template>
<template #content="{close}">
<StatusBookmarkFolderMenu
v-if="button.name === 'bookmark'"
:status="status"
:close="() => { close(); outerClose() }"
/>
</template>
</Popover>
<EmojiPicker
v-if="button.name === 'emoji'"
ref="picker"
:enable-sticker-picker="false"
:hide-custom-emoji="hideCustomEmoji"
class="emoji-picker-panel"
@emoji="addReaction"
/>
</div>
</template>
<script src="./action_button.js" />
<style lang="scss" src="./action_button.scss" />

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 17, 1:17 PM (7 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1839557
Default Alt Text
(10 KB)

Event Timeline