Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show conversation settings, if URL hash is specified #13503

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ export default {

if (to.hash === '#direct-call') {
emit('talk:media-settings:show')
} else if (to.hash === '#settings') {
emit('show-conversation-settings', { token: this.token })
}
})

Expand Down Expand Up @@ -502,6 +504,8 @@ export default {

if (this.$route.hash === '#direct-call') {
emit('talk:media-settings:show')
} else if (this.$route.hash === '#settings') {
emit('show-conversation-settings', { token: this.token })
Comment on lines +507 to +508
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature is a conversation-only feature, but handled here on a whole app level:

  • It handles hash and emits conversation-related event on all the pages without conversation (token)
  • Though it works right now, there is no guarantee conversation components are mounted and ready at this moment. It will be broken if we add anything async to the conversation page init.
  • It uses settings fragment, leaving no tinny name for Talk settings if we add it later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about moving it to the conversation view?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And about removing the hash from URL when the settings dialog is open

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ConversationSettingsDialog is detached and independent from conversations. So it could be called on empty view as well, contrary to #direct-call
  • It requires only token+conversation object to work. Maybe some additional request is needed here to ensure we fetched a conversation prior to opening the dialog
  • Removing of hash should be fine, as long as it doesn't triggering any vue-router side effects

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • as long as it doesn't triggering any vue-router side effects

If it does, it is a bug that should be fixed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It requires only token+conversation object to work

We don't have token+conversation outside the conversation view.
And a fragment cannot specify it. If we want to add ability to open setting for any conversation, it must be a query param. (Or if we want it to be combined with other fragments, like message id).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/apps/spreed/#settings

image

}

subscribe('notifications:action:execute', this.interceptNotificationActions)
Expand Down
Loading