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

Centre all notification popups #6271

Merged
merged 1 commit into from
Mar 12, 2019

Conversation

whymarrh
Copy link
Contributor

@whymarrh whymarrh commented Mar 8, 2019

Closes #6269

This PR centres all the notification popups based on the screen size.

The support for window.screen.height and window.screen.width seem good, according to MDN.[1]

@whymarrh whymarrh force-pushed the centre-notificatons branch from b4af33b to 08ea819 Compare March 8, 2019 18:40
Copy link
Contributor

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

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

One small easy change!

const width = 360

const SCREEN_WIDTH = window.screen.width
const SCREEN_HEIGHT = window.screen.height
Copy link
Contributor

Choose a reason for hiding this comment

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

Since a screen's resolution can be adjusted at run-time, we should maybe re-compute this at popup creation time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! I'll fix this right up.

@whymarrh whymarrh force-pushed the centre-notificatons branch 2 times, most recently from e8db224 to 071c924 Compare March 8, 2019 18:48
danfinlay
danfinlay previously approved these changes Mar 8, 2019
Copy link
Contributor

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

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

Awesome. I'm super embarrassed that we hadn't realized this was possible yet!

@whymarrh whymarrh force-pushed the centre-notificatons branch from 3cdcb8d to 5bf8a36 Compare March 12, 2019 14:07
@whymarrh
Copy link
Contributor Author

@danfinlay I had to rebase this on the latest develop to fix the build. Should be good, no changes.

@whymarrh
Copy link
Contributor Author

cc @cjeria

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.

3 participants