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

Implement option to display links in search sidebar. #20638

Merged
merged 9 commits into from
Oct 16, 2024

Conversation

linuspahl
Copy link
Contributor

@linuspahl linuspahl commented Oct 3, 2024

Description

Motivation and Context

This PR adds the option to render links in the search sidebar via the plugin system.

Hover styling:
image

Active styling:
image

/nocl

@@ -500,6 +509,7 @@ declare module 'graylog-web-plugin/plugin' {
'views.hooks.copyPageToDashboard'?: Array<CopyParamsToView>;
'views.hooks.removingWidget'?: Array<RemovingWidgetHook>;
'views.overrides.widgetEdit'?: Array<React.ComponentType<OverrideProps>>;
'views.sidebar.links'?: Array<SidebarLink>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be more useful to have something like views.sidebar.topSection or searchSystemSection and the Items can have some flag isLink. Having just links means that there will be just links and there might be multiple links and I'm not sure that we will add more different links (except something similar to DWH). Also if we would decided to have another section with some links it might be confusing.

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 tried to improve the name.

};

const StreamsFilter = ({ disabled, value, streams, onChange }: Props) => {
const StreamsFilter = ({ disabled, value, streams, onChange, multi }: Props) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this change in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary for making the streams filter reusable and I did not want to create another PR for this small change.

@linuspahl linuspahl merged commit c7fff37 into master Oct 16, 2024
7 checks passed
@linuspahl linuspahl deleted the sidebar-page-links branch October 16, 2024 11:35
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.

2 participants