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

[#1535] Added subheading anchors to product page sidebar #724

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma commented Aug 3, 2023

  • add subheadings to product page sidebar
  • remove anchors for 'links' and 'see further' ('zie ook')

Taiga: #1535

@pi-sigma pi-sigma force-pushed the feature/1535-sidebar-improve branch from c7429bb to 8f2371e Compare August 3, 2023 11:48
@codecov-commenter
Copy link

codecov-commenter commented Aug 3, 2023

Codecov Report

Merging #724 (770d0f8) into develop (ae69cd9) will increase coverage by 0.04%.
Report is 33 commits behind head on develop.
The diff coverage is 99.31%.

@@             Coverage Diff             @@
##           develop     #724      +/-   ##
===========================================
+ Coverage    96.27%   96.31%   +0.04%     
===========================================
  Files          674      684      +10     
  Lines        24007    24217     +210     
===========================================
+ Hits         23113    23325     +212     
+ Misses         894      892       -2     
Files Changed Coverage Δ
...pen_inwoner/components/templatetags/header_tags.py 100.00% <ø> (ø)
src/open_inwoner/pdc/tests/test_category.py 100.00% <ø> (ø)
src/open_inwoner/ssd/tests/test_views.py 100.00% <ø> (ø)
src/open_inwoner/utils/context_processors.py 90.90% <ø> (ø)
src/open_inwoner/utils/iteration.py 92.85% <92.85%> (ø)
src/open_inwoner/haalcentraal/utils.py 94.28% <96.87%> (-0.88%) ⬇️
src/open_inwoner/accounts/signals.py 94.59% <100.00%> (ø)
.../open_inwoner/accounts/tests/test_profile_views.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/views/profile.py 100.00% <100.00%> (+0.58%) ⬆️
src/open_inwoner/cms/extensions/cms_menus.py 75.00% <100.00%> (+1.82%) ⬆️
... and 20 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pi-sigma pi-sigma force-pushed the feature/1535-sidebar-improve branch 2 times, most recently from 53d1ca1 to 7cd8019 Compare August 10, 2023 06:49
@pi-sigma pi-sigma marked this pull request as ready for review August 10, 2023 08:57
src/open_inwoner/pdc/tests/test_product.py Outdated Show resolved Hide resolved
src/open_inwoner/pdc/utils.py Outdated Show resolved Hide resolved
src/open_inwoner/utils/ckeditor.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jiromaykin jiromaykin left a comment

Choose a reason for hiding this comment

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

Two changes are needed:

  1. Make it so only the Headings that are scrolled into will display as Bold, so not the entire list-item
  2. Bring back the correct blue/scroll-color (link) line that appears and shows the progress of the scroll (see image)

If you need more: You can add more scroll-classes by adding more active/open class rules for the Gumshoe JS here: src/open_inwoner/js/components/anchor-menu/anchor-menu.js

Example of primary-color 'voortgangsbalk/progress-line' on the left of each link/heading that is scrolled onto:
gumshoe-color

More info about Gumshoe:
https://github.com/cferdinandi/gumshoe

src/open_inwoner/scss/components/Header/AnchorMenu.scss Outdated Show resolved Hide resolved
@@ -82,6 +82,30 @@
}
}

// nested list
&__sublist {
list-style-type: '- ';
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to show this to a designer actually - because I think this should be 'list-style-type:none; so it looks cleaner and ore in line with the rest of the website, but i'm really not sure about this one. So perhaps leave it as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After playing around a bit with different styles, I think you're right. Changed it accordingly.

@Bartvaderkin Bartvaderkin changed the title [#1535] add subheading anchors to product page sidebar [#1535] Added subheading anchors to product page sidebar Aug 28, 2023
@pi-sigma pi-sigma changed the title [#1535] Added subheading anchors to product page sidebar [#1535] Add subheading anchors to product page sidebar Aug 29, 2023
@pi-sigma
Copy link
Contributor Author

@Bartvaderkin Why do you keep changing the titles of my PRs? I use the imperative mood for a reason. See here:

https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?h=v2.36.1#n181

@pi-sigma pi-sigma force-pushed the feature/1535-sidebar-improve branch 3 times, most recently from d93781e to 67ca2cf Compare August 29, 2023 13:50
Copy link
Contributor

@jiromaykin jiromaykin left a comment

Choose a reason for hiding this comment

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

Nice work - just one more detail to improve: on mobile there should not be a left-margin in the dropdown for the H1 level; adding a bit of a margin to the H2 level is OK for now (look at https://open-inwoner-test.maykin.nl/onderwerpen/zorg-en-ondersteuning/producten/logeeropvang/ if you need an example):

left-margin

- color only focused part of border
- bold-face only focused heading/sub-heading
- create namespace for subheading slugs to avoid conflicts
@pi-sigma pi-sigma force-pushed the feature/1535-sidebar-improve branch from 67ca2cf to faac2ca Compare August 30, 2023 10:19
@pi-sigma
Copy link
Contributor Author

@jiromaykin I replaced the magic numbers with variables. The spacing to the left of the h1, however, is no longer margin but padding (in order to make the continuous border with coloring work). Removing that altogether will push the h1 all the way to the left, so that it is no longer aligned with the menu button. I'm not 100% sure that the current alignment on mobile is correct either. Feel free to double-check.

@Bartvaderkin
Copy link
Contributor

Bartvaderkin commented Aug 31, 2023

@Bartvaderkin Why do you keep changing the titles of my PRs? I use the imperative mood for a reason. See here:

https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?h=v2.36.1#n181

We're using capitalized Verbs in this project. Describe what you did, not the task: "Added this", "Updated that". Let's stick with the patterns and not mix and mess.

@pi-sigma pi-sigma changed the title [#1535] Add subheading anchors to product page sidebar [#1535] Added subheading anchors to product page sidebar Aug 31, 2023
@alextreme alextreme merged commit 08a3925 into develop Sep 4, 2023
10 checks passed
@alextreme alextreme deleted the feature/1535-sidebar-improve branch September 4, 2023 08:43
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.

5 participants