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

Fix not working lint anchor (generation and filtering) #13588

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Oct 22, 2024

As spotted by @flip1995, the anchor button is currently not working. Problem was the JS that was preventing the web browser from adding the hash at the end of the URL.

For the second bug fixed, the JS was stripping two characters instead of just stripping the # at the beginning.

changelog: Fix clippy page lint anchor (generation and filtering)

r? @flip1995

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 22, 2024
@GuillaumeGomez
Copy link
Member Author

Considering the second bug (invalid lint ID filtering) was a one line change, I also added it here as well.

@GuillaumeGomez GuillaumeGomez changed the title Fix not working lint anchor Fix not working lint anchor (generation and filtering) Oct 22, 2024
@flip1995
Copy link
Member

Thanks for fixing this. However when clicking on the the link symbol, I kind of expect for the lint panel to open. Just jumping there is a bit confusing, as I lose track where it jumps to. The lint is then on the top of the page, but there's no visual indication where it was moved/scrolled to. The behavior now feels like "oh, where did it just jump to? Ah, to the lint I clicked on at the top of the page".

When clicking on the generated link, the lint panel opens.

@GuillaumeGomez
Copy link
Member Author

When JS is disabled, not much we can do for that. However, when JS is enabled, it's now adding the anchor in the URL and opening the lint as you asked (in the last commit).

@flip1995
Copy link
Member

Thanks!

Now the only thing that is still broken is the indentation in code blocks:
image

But that can be addressed in another PR

@bors r+

@bors
Copy link
Contributor

bors commented Oct 23, 2024

📌 Commit 7115404 has been approved by flip1995

It is now in the queue for this repository.

@GuillaumeGomez
Copy link
Member Author

Didn't have time to look at it yet. Planning to do it next. Hopefully tomorrow.

@bors
Copy link
Contributor

bors commented Oct 23, 2024

⌛ Testing commit 7115404 with merge cefa31a...

@bors
Copy link
Contributor

bors commented Oct 23, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing cefa31a to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Oct 23, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing cefa31a to master...

@bors bors merged commit cefa31a into rust-lang:master Oct 23, 2024
5 checks passed
@bors
Copy link
Contributor

bors commented Oct 23, 2024

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@GuillaumeGomez GuillaumeGomez deleted the fix-lint-anchor branch October 23, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants