Skip to content
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

change MiniToc position in DOM #248

Merged
merged 9 commits into from
Jul 26, 2024

Conversation

Pavel-Tyan
Copy link
Contributor

change MiniToc position in DOM.

Task: https://github.com/orgs/diplodoc-platform/projects/2/views/1?pane=issue&itemId=55495812

Navigation order before: Toc -> Main content -> MiniToc

2024-07-16.12-08-14.mov

Navigation order after: Toc -> Minitoc -> Main content

2024-07-16.12-15-44.mov

add hyphen in aria-label value

add Russian and English translation
replace div to nav tag
replace div to h1 for title
wrap MiniToc links into h2 and h3 tags
delete h2, h3 tags from MiniToc items
delete aria-current from MiniToc items
change h1 to h2 for MiniToc title
wrap MiniToc title in div
change MiniToc position in DocLayout component
use order property to remain MiniToc position in UI
@Pavel-Tyan Pavel-Tyan changed the title Minitoc change MiniToc position in DOM Jul 16, 2024
@@ -14,6 +14,7 @@

&__left,
&__right {
order: 3;
Copy link
Contributor

@martyanovandrey martyanovandrey Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is adding "order" property necessary ? Changing order in html is not enough?

Copy link
Contributor Author

@Pavel-Tyan Pavel-Tyan Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing order in html affects on focus order. But it also affects on Minitoc position in UI. Minitoc should be in the right side of layout and main content should be in the middle (Toc -> Main content -> MiniToc). Without "order" property MiniToc will be in the middle of layout and main content will be in the right side (Toc -> MiniToc -> Main content).

@martyanovandrey martyanovandrey merged commit 3580bcb into diplodoc-platform:master Jul 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants