mirror of
https://github.com/fleetdm/fleet
synced 2026-05-15 04:58:25 +00:00
for #29451 # Details This PR does a slight refactor of the MainContent, HostDetailsBanners and HostDetailsPage components to prevent host-details-specific banner from being shown on the Host Details page if any app-wide banners are being displayed. It does this by allowing the child of a `<MainContent>` node to be a function which takes a parameter indicating whether app-wide banners are present. The HostDetailsPage uses this new functionality to suppress host details banners when that's the case. The HostDetailsBanners component is updated to remove logic that previously attempted to detect app-wide banners, using similar logic to what MainContent does to decide whether to show banners. Instead of repeating this logic in two places, HostDetailsBanners now just renders banners. # Checklist for submitter - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [X] Manual QA for all new/changed functionality I tested this by temporarily forcing an app-wide banner (by setting [this code]( |
||
|---|---|---|
| .. | ||
| banners/VppRenewalMessage | ||
| _styles.scss | ||
| index.ts | ||
| MainContent.tsx | ||