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

Snackbar component UX/UI #99

Comments

@srenault-meeds
Copy link
Member

srenault-meeds commented Oct 10, 2023

Rationale

Two concerns regarding the snackbar:

  • Mobile:

When using mobile and receiving a notification like a success one, an info one, etc.
Problem is that the notification is displayed behind the bottom tab bar AND we cannot do anything until the notification closes

  • Desktop:

Notifications that are displayed when error, info, success or warning are not following UX guidelines as expected.
Currently:
-> text is centered aligned
-> the width of the notification is not dynamic depending on the text length
-> close icon must not have same style as the colored vertical bar

1. Functional Requirements

Top User Stories

Desktop:

Text:

  • Left aligned
  • 16px font-size
  • If text cannot be displayed in one line due to width, then line break is done automatically
  • padding-right: 30px

If CTA link

  • font-size is 16px as well
  • color of hyperlink text
  • padding-right: 30px

Close icon

  • to be only a cross (not times-circle, but times)
  • color: allPagesGreyColorLighten1
  • padding-right: 16px

Snackbar style:

  • No icon before label
  • Height: depending on text to be displayed
  • Width is maximum 50% of screen resolution if desktop and minimum 400px
  • border-radius: 4px
  • colored vertical line to the left: 8px

image

Mobile

  • The notification is displayed on behalf of the tabbar (width and height)
  • With a horizontal line that is removing depending on the time it is displayed (see design)
  • AND we can continue to browse the app
  • AND we can swipe it to remove the snackbar

notif bottom tabbar

Impacts

Any existing snackbar must use this component

Gamification

NA

Notifications

NA

Analytics

NA

Unified Search

NA

2. Technical Requirements

Extensibility

The Toast notification component is added globally in all pages with a single instance and can be called using directives:

this.$root.$emit('alert-message', MESSAGE, TYPE);
this.$root.$emit('alert-message-html', HTML_MESSAGE, TYPE);
this.$root.$emit('alert-message-html-confeti', HTML_MESSAGE, TYPE);
....
// for advanced usage, to display a link by example, we can use document.dispatchEvent
document.dispatchEvent(new CustomEvent('alert-message', {detail: {
  useHtml: true/false,
  confeti: true/false,
  alertType: 'success' | 'error' | 'warning' | 'info',
  alertMessage: MESSAGE,
  alertLink: URL,
  alertLinkText: LINK_TEXT,
  alertLinkTarget: '_blank' | '_self' ...,
  alertLinkIcon: 'fa-...',
  alertLinkTooltip: LINK_TITLE,
  alertLinkCallback: () => FUNCTION(),
}}));

This flexibility will be kept and we will have just to rework all existing notifications to re-use this component through the existing API.

Upgradability

An cleanup of existing alerts has to be made to reuse this component through existing API. In addition, the overridden style of v-alert will have to be removed to allow using v-alert as predefined in Vuetify.

Feature Flags

No feature flag.

4. Software Architecture

Access

All snackbar alerts in all Meeds modules will have to be removed in favor of this component in order to centralize the UX for a better maintainability and product design evolution.
In addition, the existing overridden v-alert style of Vuetify will have to be removed to allow using v-alert in page.
The current Snackbar z-index has to be reviewed as well to make it on top of all UI components.

@srenault-meeds srenault-meeds moved this from Open to Submitted in MIP Board Oct 10, 2023
@srenault-meeds
Copy link
Member Author

@margondicco Can you please take a look at it please?
We started to work it as enhancements but we suggest to make it a MIP to make sure you can take it into account.

boubaker added a commit to Meeds-io/platform-ui that referenced this issue Oct 10, 2023
…eeds-io/MIPs#99 (#683)

Prior to this change, the style of v-alert Vuetify component was
embedded by style. This change will delete the overridden style in favor
of adding a centralized component in social which will define the Toast
notification style.
boubaker added a commit to Meeds-io/platform-ui that referenced this issue Oct 10, 2023
…eeds-io/MIPs#99 (#683)

Prior to this change, the style of v-alert Vuetify component was
embedded by style. This change will delete the overridden style in favor
of adding a centralized component in social which will define the Toast
notification style.
boubaker added a commit to Meeds-io/social that referenced this issue Oct 10, 2023
Prior to this change, the style of v-alert Vuetify component was
embedded by stylesheet. This change will enhance the UX of Toast
notifications UX in desktop and mobile.
boubaker added a commit to Meeds-io/platform-ui that referenced this issue Oct 10, 2023
…eeds-io/MIPs#99 (#685)

Prior to this change, the style of v-alert Vuetify component was
embedded by style. This change will delete the overridden style in favor
of adding a centralized component in social which will define the Toast
notification style.
boubaker added a commit to Meeds-io/wallet that referenced this issue Oct 10, 2023
…/MIPs#99 (#425)

Prior to this change, the toast notifications wasn't relying on the
centralized reusable component to display alerts. This change removes
the specific alerts in order to reuse the centralized component.
boubaker added a commit to Meeds-io/perk-store that referenced this issue Oct 10, 2023
…/MIPs#99 (#276)

Prior to this change, the used toast notifications wasn't relying on the centralized reusable component to display alerts. This change removes the specific alerts in order to reuse the centralized component.
boubaker added a commit to Meeds-io/gamification that referenced this issue Oct 10, 2023
…/MIPs#99 (#1244)

This change will fix usage of Toast notification with HTML content by
deleting extra spaces.
boubaker added a commit to Meeds-io/social that referenced this issue Oct 10, 2023
…#3030)

Prior to this change, the style of v-alert Vuetify component was
embedded by stylesheet. This change will enhance the UX of Toast
notifications UX in desktop and mobile.
boubaker added a commit to Meeds-io/notes that referenced this issue Oct 10, 2023
…/MIPs#99 (#772)

Prior to this change, the used toast notifications wasn't relying on the
centralized reusable component to display alerts. This change removes
the specific alerts in order to reuse the centralized component.
boubaker added a commit to Meeds-io/social that referenced this issue Oct 10, 2023
…#3030)

Prior to this change, the style of v-alert Vuetify component was
embedded by stylesheet. This change will enhance the UX of Toast
notifications UX in desktop and mobile.
@margondicco
Copy link

Hello ok cc @Julien-Dubois-eXo

@srenault-meeds
Copy link
Member Author

Thanks Go-Fonc added

@boubaker
Copy link
Member

boubaker commented Oct 10, 2023

Ready for tech review by DAO members (eXo: @rdenarie )

exo-swf pushed a commit to Meeds-io/social that referenced this issue Oct 10, 2023
…#3030)

Prior to this change, the style of v-alert Vuetify component was
embedded by stylesheet. This change will enhance the UX of Toast
notifications UX in desktop and mobile.
exo-swf pushed a commit to Meeds-io/gamification that referenced this issue Oct 10, 2023
…/MIPs#99 (#1244)

This change will fix usage of Toast notification with HTML content by
deleting extra spaces.
@rdenarie
Copy link
Member

Go tech

@srenault-meeds srenault-meeds moved this from Submitted to Accepted in MIP Board Oct 11, 2023
exo-swf pushed a commit to Meeds-io/social that referenced this issue Oct 11, 2023
…#3030)

Prior to this change, the style of v-alert Vuetify component was
embedded by stylesheet. This change will enhance the UX of Toast
notifications UX in desktop and mobile.
exo-swf pushed a commit to Meeds-io/gamification that referenced this issue Oct 11, 2023
…/MIPs#99 (#1244)

This change will fix usage of Toast notification with HTML content by
deleting extra spaces.
boubaker added a commit to Meeds-io/social that referenced this issue Oct 17, 2023
@boubaker boubaker reopened this Oct 17, 2023
@boubaker boubaker moved this from Completed to Accepted in MIP Board Oct 17, 2023
@boubaker
Copy link
Member

All pr validated

Thanks @rdenarie , can you please review again Meeds-io/notes#779
A modification is made due to a rebase conflict

boubaker added a commit to Meeds-io/notes that referenced this issue Oct 17, 2023
@github-project-automation github-project-automation bot moved this from Accepted to Completed in MIP Board Oct 17, 2023
@boubaker
Copy link
Member

All pr validated

Thanks @rdenarie . All PRs merged.

@boubaker boubaker removed the Dev done label Oct 17, 2023
exo-swf pushed a commit to Meeds-io/platform-ui that referenced this issue Oct 17, 2023
…eeds-io/MIPs#99 (#685)

Prior to this change, the style of v-alert Vuetify component was
embedded by style. This change will delete the overridden style in favor
of adding a centralized component in social which will define the Toast
notification style.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Oct 17, 2023
…#3030)

Prior to this change, the style of v-alert Vuetify component was
embedded by stylesheet. This change will enhance the UX of Toast
notifications UX in desktop and mobile.
exo-swf pushed a commit to Meeds-io/gamification that referenced this issue Oct 17, 2023
…/MIPs#99 (#1244)

This change will fix usage of Toast notification with HTML content by
deleting extra spaces.
exo-swf pushed a commit to Meeds-io/perk-store that referenced this issue Oct 17, 2023
…/MIPs#99 (#276)

Prior to this change, the used toast notifications wasn't relying on the centralized reusable component to display alerts. This change removes the specific alerts in order to reuse the centralized component.
exo-swf pushed a commit to Meeds-io/wallet that referenced this issue Oct 17, 2023
…/MIPs#99 (#425)

Prior to this change, the toast notifications wasn't relying on the
centralized reusable component to display alerts. This change removes
the specific alerts in order to reuse the centralized component.
exo-swf pushed a commit to Meeds-io/notes that referenced this issue Oct 17, 2023
…/MIPs#99 (#772)

Prior to this change, the used toast notifications wasn't relying on the
centralized reusable component to display alerts. This change removes
the specific alerts in order to reuse the centralized component.
exo-swf pushed a commit to Meeds-io/task that referenced this issue Oct 17, 2023
…/MIPs#99 (#276)

Prior to this change, the toast notifications defined in Tasks wasn't
relying on the centralized reusable component to display alerts. This
change removes the specific alerts added to Tasks application in order
to reuse the centralized component.
exo-swf pushed a commit to Meeds-io/meeds-qa-ui that referenced this issue Oct 17, 2023
Prior to this change, the Task alert messages wasn't reusing the Snack
bar component. After MIP#99, the Tasks alerts were changed to use the
reusable alert messages component centralized in a page. This change
will delete specific Task alert messages check to reuse a simplified
check (without being dependant from Crowdin Translation changes).
rdenarie added a commit to exoplatform/commons-exo that referenced this issue Oct 17, 2023
Alert component have been reworked in meeds part.
In order to let exoplatform v-alert working, we add here needed css.
When all v-alert on exo side will be reworked, this workaround must be removed
rdenarie added a commit to exoplatform/commons-exo that referenced this issue Oct 19, 2023
Alert component have been reworked in meeds part.
There is problem with existing toast notification which are display in all the width on a large screen
This fix apply the needed min-width only on small screen
rdenarie added a commit to exoplatform/commons-exo that referenced this issue Oct 20, 2023
Alert component have been reworked in meeds part.
There is problem with existing toast notification which are display in all the width on a large screen
This fix apply the needed min-width only on small screen
SaraBoutej pushed a commit to Meeds-io/platform-ui that referenced this issue Oct 23, 2023
…eeds-io/MIPs#99 (#685)

Prior to this change, the style of v-alert Vuetify component was
embedded by style. This change will delete the overridden style in favor
of adding a centralized component in social which will define the Toast
notification style.
SaraBoutej pushed a commit to Meeds-io/gamification that referenced this issue Oct 23, 2023
…/MIPs#99 (#1244)

This change will fix usage of Toast notification with HTML content by
deleting extra spaces.
SaraBoutej pushed a commit to Meeds-io/gamification that referenced this issue Oct 23, 2023
…/MIPs#99 (#1244)

This change will fix usage of Toast notification with HTML content by
deleting extra spaces.
rdenarie added a commit to exoplatform/automatic-translation that referenced this issue Oct 25, 2023
rdenarie added a commit to exoplatform/automatic-translation that referenced this issue Oct 25, 2023
exo-swf pushed a commit to exoplatform/automatic-translation that referenced this issue Oct 25, 2023
rdenarie added a commit to exoplatform/automatic-translation that referenced this issue Oct 27, 2023
rdenarie added a commit to exoplatform/automatic-translation that referenced this issue Oct 28, 2023
SaraBoutej pushed a commit to Meeds-io/platform-ui that referenced this issue Nov 21, 2023
…eeds-io/MIPs#99 (#685)

Prior to this change, the style of v-alert Vuetify component was
embedded by style. This change will delete the overridden style in favor
of adding a centralized component in social which will define the Toast
notification style.
@boubaker boubaker added this to the 1.5.0-M18 milestone Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment