-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Area: Code QualityFor refactoring, cleanup, or improvements to maintainabilityFor refactoring, cleanup, or improvements to maintainabilityArea: MobileFor issues affecting mobile or responsive behaviorFor issues affecting mobile or responsive behavior
Description
Increasing Access
Having a centralised approach for breakpoints
will enhance the code readability, collaboration, and scalability. It will ensure a consistent and efficient approach to handling responsiveness in our project.
Feature enhancement details
The current code appears to be decentralized regarding breakpoints, which may impact maintainability and consistency
By consolidating breakpoints in a dedicated file, we can streamline development, making it easier to manage and update responsive design across the editor.
Approch
Using a centralised breakpoints.js
const breakpoints = {
mobile: 767,
tablet: 1024, // Just for reference, as we don't have distinct breakpoints for tablets now
};
Importing the breakpoints in the components where we need to use media queries.
import breakpoints from './breakpoints';
const aRandomComponent = () => {
const isMobile = useMediaQuery({ maxWidth: breakpoints.mobile });
....
};
I want to work on this issue
Metadata
Metadata
Assignees
Labels
Area: Code QualityFor refactoring, cleanup, or improvements to maintainabilityFor refactoring, cleanup, or improvements to maintainabilityArea: MobileFor issues affecting mobile or responsive behaviorFor issues affecting mobile or responsive behavior