-
Notifications
You must be signed in to change notification settings - Fork 434
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: draft polls management 📊 #13518
base: main
Are you sure you want to change the base?
Conversation
06413e0
to
9c30404
Compare
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
5ad83f9
to
529d2de
Compare
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
529d2de
to
c22c94f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality works well
<NcActions v-if="supportPollDrafts" force-menu> | ||
<NcActionButton v-if="isModerator" :disabled="!isFilled" @click="createPollDraft"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditions can be merged on NcActions
level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of 'Export draft to file', which should be allowed to non-moderators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should be allowed to non-moderators, cc @nickvergessen
<NcActions v-if="supportPollDrafts" force-menu> | ||
<NcActionButton v-if="isModerator" close-after-click @click="openPollDraftHandler"> | ||
<template #icon> | ||
<IconFileEdit :size="20" /> | ||
</template> | ||
{{ t('spreed', 'Browse poll drafts') }} | ||
</NcActionButton> | ||
</NcActions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditions on same level here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
--> | ||
|
||
<template> | ||
<NcDialog class="drafts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just hide the button in case PollEditor is open (as we can see it behind), but don't close it, like ConversationSettings dialog stays behind while you're checking bans - subfeature on top of main one.
Besides, PollEditor can be larger if there are more answers filled. Though we can squezee drafts dialog to 2 drafts in a row?
3 | 2 |
---|---|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just hide the button in case PollEditor is open (as we can see it behind), but don't close it, like ConversationSettings dialog stays behind while you're checking bans - subfeature on top of main one.
Fine by me, but I'd still prefer renaming it to "back"
Besides, PollEditor can be larger if there are more answers filled. Though we can squezee drafts dialog to 2 drafts in a row?
Yes, but we should cover all scenarios. It needs to have a default height and width that can cover the poll editor ?
</template> | ||
{{ t('spreed', 'Save as draft') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be influenced by github but I expected to find this button in a menu with "Create draft" but not like we have in CallButton (you can press directly "create draft" but for "Save as draft" needs to click on the down arrow button and then click on it). So basically, make the 3 dot icon a down arrow and attach it to the "create draft".
There is a discussion about this type of buttons for call button so we can change it later once we agree on using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find really nice and intuitive, maybe 3 dot is to be replaced with down arrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these two actions are not related, so I wouldn't group them. Taking into account how advanced this feature is, I would just add an unlabelled "save" button to the left of the primary action. We can also remove the dismiss button since we already have the close dialog close button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to the left of the primary action
Thing is, we might want to extend the actions range (+ export to file, for example). But without a 'Dismiss' button three-dot menu should already look better
…olls Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
☑️ Resolves
🖌️ UI Checklist
🖼️ Screenshots / Screencasts
🚧 Tasks
🏁 Checklist