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

Disable activeHeaderLinks for VuePress. Remove bullet points in server config doc. #2449

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

lilincmu
Copy link
Contributor

Small UI changes regarding anchor links.

Disable activeHeaderLinks for VuePress

Currently, when clicking header links in server configuration doc, such as --allow-fork-prs, the expected anchor link https://www.runatlantis.io/docs/server-configuration.html#allow-fork-prs won't persist, but will be changed to https://www.runatlantis.io/docs/server-configuration.html#flags.

The reason is that we are enabling Active Header Links with a sidebarDepth to be 1 by default. So once we jump to the #allow-fork-prs tag, we are immediately redirected to the parent tag within sidebarDepth, in this case, #flags.

One way to fix this is to increase the sidebarDepth, however, doing so will make our sidebar a bit cluttered as shown below (which might be fine).
Screen Shot 2022-08-15 at 2 31 29 PMScreen Shot 2022-08-15 at 2 31 10 PM

Another way is to disable the activeHeaderLinks behavior, so that the browser won't try to update the URL to the parent tag. Unless many of our users are relying on the behavior to get an anchor link, I feel it's a better option. It's less disruptive to our website layout and could be more flexible since we can have an arbitrarily deep anchor link without it being redirected to its parent tag anymore.

Remove bullet points in server config doc

If we click through the link https://www.runatlantis.io/docs/server-configuration.html#allow-fork-prs, the page won't jump to the exact section, but with a small offset.
Screen Shot 2022-08-15 at 2 43 52 PM

It's because we indented the headers with bullet points * ###, which inadvertently makes VuePress drop some of the styles it could have added to the headers. We could keep the bullet point and add some custom styles like vuejs/vuepress#2771 (comment) suggested, but I think we might as well drop the bullet points so that the styles would be rendered correctly.
Screen Shot 2022-08-15 at 3 02 13 PM

Also when we hover over the header, the hashtag and bullet point will overlap, so yet another reason to drop them in my opinion.
Screen Shot 2022-08-15 at 2 17 21 PM

@lilincmu lilincmu requested a review from a team as a code owner August 15, 2022 22:06
@jamengual jamengual merged commit e301958 into runatlantis:master Aug 15, 2022
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
@nitrocode nitrocode added this to the v0.19.8 milestone Mar 23, 2023
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.

3 participants