Skip to content

refactor: extract responsive breakpoint widths into constants#5018

Merged
walterbender merged 2 commits intosugarlabs:masterfrom
zealot-zew:refactor/breakpoint-width-constants
Jan 12, 2026
Merged

refactor: extract responsive breakpoint widths into constants#5018
walterbender merged 2 commits intosugarlabs:masterfrom
zealot-zew:refactor/breakpoint-width-constants

Conversation

@zealot-zew
Copy link
Contributor

  • 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

- 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
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

✅ All Jest tests passed! This PR is ready to merge.

js/activity.js Outdated
const _MSGTIMEOUT_ = 60000;

// Responsive breakpoint constants
const BREAKPOINT_TABLET = 768;
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 it would be more clear if the constant name were a bit more verbose: RESPONSIVE_BREAKPOINT_TABLET...

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@zealot-zew
Copy link
Contributor Author

Changed to a much verbose variable name as recommended

@walterbender walterbender merged commit 275db03 into sugarlabs:master Jan 12, 2026
5 checks passed
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
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.

2 participants