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

Unify breadcrumbs behaviour with other Grafana Apps and main core #3003

Merged

Conversation

maskin25
Copy link
Contributor

What this PR does

Unify breadcrumbs behaviour with other Grafana Apps and main core

Which issue(s) this PR fixes

#1906

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@maskin25 maskin25 requested a review from a team September 11, 2023 13:41
@maskin25 maskin25 added the pr:no public docs Added to a PR that does not require public documentation updates label Sep 11, 2023
@maskin25 maskin25 self-assigned this Sep 11, 2023
@@ -89,6 +93,12 @@ class IncidentPage extends React.Component<IncidentPageProps, IncidentPageState>
store.alertGroupStore.updateSilenceOptions();
}

componentWillUnmount(): void {
Copy link
Member

@teodosii teodosii Sep 13, 2023

Choose a reason for hiding this comment

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

Wouldn't it be better to make a generic React component that handles this cleanup so that we rely on base class functionality strictly for context usage?
Like a BaseContext<P, S> component that extends React.Component<P, S> where you add the contextType, context, cleanup function and componentWillUnmount (and if ever we're going to add more to the componentWillUnmount for the extended component we can just call cleanup on the base class instead).

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 removed context usage from this PR, I think it is redundant in this case

@maskin25 maskin25 merged commit 85c8605 into dev Sep 21, 2023
18 of 20 checks passed
@maskin25 maskin25 deleted the maxim/#1906-Unify-breadcrumbs-behaviour-with-other-Grafana-Apps branch September 21, 2023 14:31
@@ -20,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Notify user via Slack/mobile push-notification when their shift swap request is taken by @joeyorlando ([#2992](https://github.com/grafana/oncall/pull/2992))
- Unify breadcrumbs behaviour with other Grafana Apps and main core# ([1906](https://github.com/grafana/oncall/issues/1906))
Copy link
Contributor

Choose a reason for hiding this comment

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

@maskin25 can you retroactively update the CHANGELOG to remove this line? Seems to be duplicated, correct?

brojd pushed a commit that referenced this pull request Sep 18, 2024
)

# What this PR does

Unify breadcrumbs behaviour with other Grafana Apps and main core

## Which issue(s) this PR fixes

#1906

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants