refactor: extract responsive breakpoint widths into constants#5018
Merged
walterbender merged 2 commits intosugarlabs:masterfrom Jan 12, 2026
Merged
Conversation
- Add BREAKPOINT_TABLET (768px) and BREAKPOINT_MOBILE (600px) constants - Replace 5 hardcoded breakpoint values with named constants - Improves code maintainability and prevents magic numbers Affected lines: 769, 776, 787, 794, 856 in js/activity.js
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
js/activity.js
Outdated
| const _MSGTIMEOUT_ = 60000; | ||
|
|
||
| // Responsive breakpoint constants | ||
| const BREAKPOINT_TABLET = 768; |
Member
There was a problem hiding this comment.
I think it would be more clear if the constant name were a bit more verbose: RESPONSIVE_BREAKPOINT_TABLET...
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
Contributor
Author
|
Changed to a much verbose variable name as recommended |
021nirav-blip
pushed a commit
to 021nirav-blip/musicblocks
that referenced
this pull request
Jan 28, 2026
…abs#5018) * refactor: extract responsive breakpoint widths into constants - Add BREAKPOINT_TABLET (768px) and BREAKPOINT_MOBILE (600px) constants - Replace 5 hardcoded breakpoint values with named constants - Improves code maintainability and prevents magic numbers Affected lines: 769, 776, 787, 794, 856 in js/activity.js * changing to a much verbose variable name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected lines: 769, 776, 787, 794, 856 in js/activity.js