-
Notifications
You must be signed in to change notification settings - Fork 739
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 Ruler class to centralize common functionality and enforce subclass implementation #10907
Refactor Ruler class to centralize common functionality and enforce subclass implementation #10907
Conversation
9fb352d
to
9def96f
Compare
177456e
to
766617b
Compare
766617b
to
01ff76c
Compare
browser/Makefile.am
Outdated
src/control/VRuler.ts \ | ||
src/control/HRuler.ts \ | ||
src/control/Ruler.ts \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have 2 of these?
src/control/Signing.js \ | ||
src/control/Toolbar.js \ | ||
src/control/VRuler.ts \ | ||
src/control/Ruler.ts \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same here, why duplicate?
Works well, thanks @Darshan-upadhyay1110 :) Don't know why that test is failing. Maybe a rebase could work? |
01ff76c
to
6a59100
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements :)
6a59100
to
8b5d792
Compare
…ubclass implementation - Converted ruler file into typescript - created base class and subclass for Horizontal and vertical ruler - Moved the `_updatePaintTimer` method to the base `Ruler` class to avoid duplication across `HRuler` and `VRuler`. - Added `_updateBreakPoints` as an abstract-like method in the base class, throwing an error to enforce implementation in subclasses. - Streamlined the initialization logic in `Ruler.initializeRuler` for better readability and modularity. Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: I8f0187588ffab533e135023285acb3dcada832d4
- Change overflow from hidden to overflow-x: clip to ensure horizontal ruler visibility. - Prevent vertical ruler overflow beyond parent container when zoomed in. - Resolve misalignment when the tab container has custom or transparent background. Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: I43e52f248ba4d4a9fc86d9ba347de776a0894334
8b5d792
to
9096d51
Compare
_updatePaintTimer
method to the baseRuler
class to avoid duplication acrossHRuler
andVRuler
._updateBreakPoints
as an abstract-like method in the base class, throwing an error to enforce implementation in subclasses.Ruler.initializeRuler
for better readability and modularity.Change-Id: I8f0187588ffab533e135023285acb3dcada832d4
Summary
TODO
Checklist
make prettier-write
and formatted the code.make check
make run
and manually verified that everything looks okay