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: draft polls management 📊 #13518

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Oct 11, 2024

☑️ Resolves

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

Creation Open poll
image image
Closed poll Shared Items
image image
Filled Empty
image image

🚧 Tasks

  • Dialog + Placement
    • Empty View
  • Draft deletion

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Base automatically changed from feat/13439/drafts-for-polls-frontend to main October 14, 2024 10:11
An error occurred while trying to automatically change base from feat/13439/drafts-for-polls-frontend to main October 14, 2024 10:11
@Antreesy Antreesy force-pushed the feat/13439/drafts-for-polls-frontend-2 branch from 5ad83f9 to 529d2de Compare October 14, 2024 13:42
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>
@Antreesy Antreesy force-pushed the feat/13439/drafts-for-polls-frontend-2 branch from 529d2de to c22c94f Compare October 14, 2024 18:45
@Antreesy Antreesy marked this pull request as ready for review October 14, 2024 18:45
Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

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

Functionality works well

src/components/NewMessage/NewMessagePollEditor.vue Outdated Show resolved Hide resolved
Comment on lines +71 to +72
<NcActions v-if="supportPollDrafts" force-menu>
<NcActionButton v-if="isModerator" :disabled="!isFilled" @click="createPollDraft">
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

Comment on lines +17 to +24
<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>
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here

src/components/PollViewer/PollDraftHandler.vue Outdated Show resolved Hide resolved
src/components/PollViewer/PollDraftHandler.vue Outdated Show resolved Hide resolved
-->

<template>
<NcDialog class="drafts"
Copy link
Contributor

Choose a reason for hiding this comment

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

Make it bigger so it can hide the other dialog?
image

Or close that modal once this is open.
A good addition would be to rename the button to "Back" instead of "Create a new poll" when it's opened from poll editor :). The flow would make sense much better.

Copy link
Contributor Author

@Antreesy Antreesy Oct 15, 2024

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
image image

Copy link
Contributor

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 ?

Comment on lines +75 to +76
</template>
{{ t('spreed', 'Save as draft') }}
Copy link
Contributor

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.

Copy link
Contributor Author

@Antreesy Antreesy Oct 15, 2024

Choose a reason for hiding this comment

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

Like this?
image

Looks nice for me, but IIRC design team is against that styling

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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

Copy link
Member

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

Copy link
Contributor Author

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

src/components/NewMessage/NewMessage.vue Outdated Show resolved Hide resolved
src/components/NewMessage/NewMessagePollEditor.vue Outdated Show resolved Hide resolved
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants