Merge remote-tracking branch 'tusooa/from/develop/tusooa/tree-threading' into shigusegubu

* tusooa/from/develop/tusooa/tree-threading:
  Add English translations for fading ancestor option
  Make fading ancestors optional
  Update English translation for tree view settings
  Split conversation display style into two different settings
  Make 'Show full conversation' button have left border in embbeded mode
  Fix showingLongSubject not correctly propagated
  Fix timeline jump when scrolling
  Make replying and mediaPlaying controlled
  Clean up debug code for tree threading
  Fix virtual scrolling for tree threading
  Fix controlled status display toggles
  Add English translations for other replies count
  Add other replies count for reply list link
  Do not display replies inside status as link if there are no other replies
This commit is contained in:
Henry Jameson 2022-03-06 23:42:04 +02:00
commit b40942557c
7 changed files with 44 additions and 26 deletions

View file

@ -81,14 +81,17 @@ const conversation = {
return this.$store.getters.mergedConfig.conversationDisplay
},
isTreeView () {
return this.displayStyle === 'tree' || this.displayStyle === 'simple_tree'
return !this.isLinearView
},
treeViewIsSimple () {
return this.displayStyle === 'simple_tree'
return !this.$store.getters.mergedConfig.conversationTreeAdvanced
},
isLinearView () {
return this.displayStyle === 'linear'
},
shouldFadeAncestors () {
return this.$store.getters.mergedConfig.conversationTreeFadeAncestors
},
otherRepliesButtonPosition () {
return this.$store.getters.mergedConfig.conversationOtherRepliesButton
},

View file

@ -19,29 +19,29 @@
</button>
</div>
<div class="conversation-body panel-body">
<div
v-if="shouldShowAllConversationButton"
class="conversation-dive-to-top-level-box"
>
<i18n
path="status.show_all_conversation_with_icon"
tag="button"
class="button-unstyled -link"
@click.prevent="diveToTopLevel"
>
<FAIcon
place="icon"
icon="angle-double-left"
/>
<span place="text">
{{ $tc('status.show_all_conversation', otherTopLevelCount, { numStatus: otherTopLevelCount }) }}
</span>
</i18n>
</div>
<div
v-if="isTreeView"
class="thread-body"
>
<div
v-if="shouldShowAllConversationButton"
class="conversation-dive-to-top-level-box"
>
<i18n
path="status.show_all_conversation_with_icon"
tag="button"
class="button-unstyled -link"
@click.prevent="diveToTopLevel"
>
<FAIcon
place="icon"
icon="angle-double-left"
/>
<span place="text">
{{ $tc('status.show_all_conversation', otherTopLevelCount, { numStatus: otherTopLevelCount }) }}
</span>
</i18n>
</div>
<div
v-if="shouldShowAncestors"
class="thread-ancestors"
@ -50,7 +50,7 @@
v-for="status in ancestorsOf(diveRoot)"
:key="status.id"
class="thread-ancestor"
:class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1}"
:class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1, '-faded': shouldFadeAncestors}"
>
<status
ref="statusComponent"
@ -210,7 +210,7 @@
border-left: 2px solid var(--border, $fallback--border);
}
.thread-ancestor .StatusContent {
.thread-ancestor.-faded .StatusContent {
--link: var(--faintLink);
--text: var(--faint);
color: var(--text);

View file

@ -22,7 +22,7 @@ const GeneralTab = {
value: mode,
label: this.$t(`settings.subject_line_${mode === 'masto' ? 'mastodon' : mode}`)
})),
conversationDisplayOptions: ['tree', 'simple_tree', 'linear'].map(mode => ({
conversationDisplayOptions: ['tree', 'linear'].map(mode => ({
key: mode,
value: mode,
label: this.$t(`settings.conversation_display_${mode}`)

View file

@ -198,6 +198,16 @@
v-if="conversationDisplay !== 'linear'"
class="setting-list suboptions"
>
<li>
<BooleanSetting path="conversationTreeAdvanced">
{{ $t('settings.tree_advanced') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="conversationTreeFadeAncestors">
{{ $t('settings.tree_fade_ancestors') }}
</BooleanSetting>
</li>
<li>
<label for="maxDepthInThread">
{{ $t('settings.max_depth_in_thread') }}

View file

@ -473,7 +473,8 @@
"subject_line_noop": "Do not copy",
"conversation_display": "Conversation display style",
"conversation_display_tree": "Tree-style",
"conversation_display_simple_tree": "Simplified tree-style",
"tree_advanced": "Allow more flexible navigation in tree view",
"tree_fade_ancestors": "Display ancestors of the current status in faint text",
"conversation_display_linear": "Linear-style",
"conversation_other_replies_button": "Show the \"other replies\" button",
"conversation_other_replies_button_below": "Below statuses",

View file

@ -86,7 +86,9 @@ export const defaultState = {
virtualScrolling: undefined, // instance default
sensitiveByDefault: undefined, // instance default
conversationDisplay: undefined, // instance default
conversationTreeAdvanced: undefined, // instance default
conversationOtherRepliesButton: undefined, // instance default
conversationTreeFadeAncestors: undefined, // instance default
maxDepthInThread: 6
}

View file

@ -53,8 +53,10 @@ const defaultState = {
theme: 'pleroma-dark',
virtualScrolling: true,
sensitiveByDefault: false,
conversationDisplay: 'simple_tree',
conversationDisplay: 'linear',
conversationTreeAdvanced: false,
conversationOtherRepliesButton: 'below',
conversationTreeFadeAncestors: false,
maxDepthInThread: 6,
// Nasty stuff