fix: spacing and indention of toc#4770
Conversation
|
CI is Failing for - In Line no 168 Moving this Line no 252 Moving this Should work. won't be raising PR for such small things. |
ok thanks for this @atharvyadav22 , should i go ahead and fix this, and also it looks like there is a merge conflict too, so will fix that too |
|
What is the status of this PR? |
There was a problem hiding this comment.
Pull request overview
Improves the Reader Table of Contents (TOC) drawer layout and typography to better reflect section hierarchy and spacing (Fixes #4749).
Changes:
- Adds TOC-specific spacing/typography constants in
ComposeDimens. - Updates
TableDrawerSheetto introduce a styled TOC header divider, hierarchical indentation, and per-level font styling for TOC entries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core/src/main/java/org/kiwix/kiwixmobile/core/utils/ComposeDimens.kt | Adds new TOC padding/indent/font-size constants and heading-level constants. |
| core/src/main/java/org/kiwix/kiwixmobile/core/main/reader/ReaderScreen.kt | Refactors TOC drawer UI: new header layout, divider, per-level styling, and item indentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .then( | ||
| Modifier | ||
| ) |
There was a problem hiding this comment.
The .then(Modifier) call is a no-op and adds noise to the modifier chain. It can be removed (or replaced with a real conditional modifier if something was intended here).
| .then( | |
| Modifier | |
| ) |
| .then( | ||
| Modifier | ||
| ) |
There was a problem hiding this comment.
TOC rows no longer apply minimumInteractiveComponentSize(). With the reduced vertical padding, items can fall below the 48dp minimum touch target, which hurts accessibility/usability. Consider re-adding minimumInteractiveComponentSize() (or otherwise enforcing a min height) on the clickable row container.
| .then( | |
| Modifier | |
| ) | |
| .minimumInteractiveComponentSize() |
|
@MohitMaliFtechiz |
|
@atharvyadav22 Thanks. What do you think about the current UI(updated on the PR description)? Do you have any other reference for the UI? |
|
@MohitMaliFtechiz @kelson42 |
|
@atharvyadav22 Thanks for the proposal! I really like the improved layout and hierarchy. My only concern is typography consistency. |
|
@harshsomankar123-tech |
|
Hii @atharvyadav22 |
We will hold this as of now when mentors are free we will have a look at this as it's just UX improvement. |
Fixes #4749
Screenshots
