Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

svelte: Add link to code-graph page to repo navigation#62899

Merged
fkling merged 2 commits intomainfrom
fkling/srch-438-add-link-to-code-graph-data
May 24, 2024
Merged

svelte: Add link to code-graph page to repo navigation#62899
fkling merged 2 commits intomainfrom
fkling/srch-438-add-link-to-code-graph-data

Conversation

@fkling
Copy link
Contributor

@fkling fkling commented May 24, 2024

This adds a link to the repository's code-graph page to the repo navigation.

Additional changes:

  • added a flag to each menu item that specifies whether or not show the entry for non-admin users (defaults to false)
  • updated vite's proxy configuration to properly load React repo pages from the server
Normal user Site admin
2024-05-24_14-12 2024-05-24_14-12_1

Test plan

Manual testing. The link shows up and redirects to the React code graph page.

This adds a link to the repository's code-graph page to the repo
navigation.

Additional changes:
- added a flag to each menu item that specifies whether
or not show the entry for non-admin users (defaults to `false`)
- updated vite's proxy configuration to properly load React repo pages
  from the server
@fkling fkling added the team/code-search Issues owned by the code search team label May 24, 2024
@fkling fkling requested a review from a team May 24, 2024 12:13
@fkling fkling self-assigned this May 24, 2024
@cla-bot cla-bot bot added the cla-signed label May 24, 2024
]
const menuEntries: { path: string; icon: string; title: string }[] = [
{ path: '/-/compare', icon: mdiHistory, title: 'Compare' },
const menuEntries: { path: string; icon: string; title: string; user?: boolean }[] = [
Copy link
Member

Choose a reason for hiding this comment

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

Could we pull this out to a named interface and document the user field? It took me a couple of looks to understand what that field means, so would be nice to be able to document it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I extracted the interface and also renamed the property to make it more explicit. There shouldn't be any confusion about it now :)

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Much more clear 🙂

@fkling fkling merged commit 4497bba into main May 24, 2024
@fkling fkling deleted the fkling/srch-438-add-link-to-code-graph-data branch May 24, 2024 15:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/code-search Issues owned by the code search team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants