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

Refactor web notif bar #28

Merged
merged 2 commits into from
Apr 7, 2021
Merged

Refactor web notif bar #28

merged 2 commits into from
Apr 7, 2021

Conversation

frahman5
Copy link
Contributor

@frahman5 frahman5 commented Apr 6, 2021

Refactories notification bar for web to show across the whole page, bump page content down, and use simpler render logic.

In service to: seasons/flare#386

@frahman5 frahman5 changed the title refactor show logic Refactor web notif bar Apr 6, 2021
@frahman5 frahman5 marked this pull request as ready for review April 6, 2021 22:11
Comment on lines +65 to +83
const notificationBar = data?.me?.notificationBar

const notificationBarId = notificationBar?.id
const icon = notificationBar?.icon
const clickCount = notificationBar?.clickCount
const viewCount = notificationBar?.viewCount

const web = notificationBar?.web
const mobile = notificationBar?.mobile
const webRoute = web?.route
const mobileRoute = mobile?.route

const palette = notificationBar?.palette
const defaultPalette = palette?.default
const pressedPalette = palette?.pressed

const isDismissableNotif = webRoute?.dismissable && mobileRoute?.dismissable
const hasBeenClickedBefore = clickCount > 0
const hasBeenClosedBefore = isDismissableNotif && hasBeenClickedBefore
Copy link
Contributor

Choose a reason for hiding this comment

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

<3

@kierangillen kierangillen merged commit 3dec116 into main Apr 7, 2021
@kierangillen kierangillen deleted the refactor/notifBar branch April 7, 2021 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants