asyncapi / asyncapi-react

React component for rendering documentation from your specification in real-time in the browser. It also provides a WebComponent and bundle for Angular and Vue
https://asyncapi.github.io/asyncapi-react/
Apache License 2.0
188 stars 127 forks source link

fix Sidebar.tsx #1110

Open parthikjadav opened 2 days ago

parthikjadav commented 2 days ago

fixed this issue #1109

Description

Changes proposed in this pull request:

The anchor link for a message in the sidebar does not work as expected when message.name() and message.id() differ.

Expected result Clicking on a message in the sidebar should set the correct hash in the URL and scroll the message into view.

Actual result The anchor link only works if message.name() and message.id() are identical. If message.name() is not provided, the hash becomes #message-undefined.

before image

after image

asyncapi-bot commented 2 days ago

We require all PRs to follow Conventional Commits specification. More details 👇🏼

 No release type found in pull request title "fix Sidebar.tsx". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit
sonarcloud[bot] commented 2 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE