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

Fix dashboard header UI (under FAB replacement FF) #9464

Open
wants to merge 2 commits into
base: release/6.5.0
Choose a base branch
from

Conversation

labo-flg
Copy link
Member

Proposed changes

Under FAB_REPLACMEENT feature flag, the import/create buttons are moved to the header bar, which is already crowded with buttons.

I suggest to move the time filters under the header, so that the header displays correctly when the screen size is >= 1400px wide.

image

@@ -135,6 +134,7 @@ const WorkspaceCreation = ({ paginationOptions, type }) => {
>
{t_i18n('Import dashboard')}
</Button>
<CreateEntityControlledDial entityType='Dashboard' {...props} />
Copy link
Member Author

Choose a reason for hiding this comment

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

we keep the same order everywhere : from left to right = tertiary > secondary > primary

<Security
needs={[EXPLORE_EXUPDATE, INVESTIGATION_INUPDATE]}
hasAccess={canEdit}
placeholder={
Copy link
Member Author

Choose a reason for hiding this comment

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

Security placeholder was the same as the child component, so either the Security is irrelevant or we need to remove the placeholder.

/>
{isFABReplaced && (
<div style={{ marginTop: 8 }}>
<DashboardTimeFilters
Copy link
Member Author

Choose a reason for hiding this comment

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

I refactored the time filters, extracting the code from WorkspaceHeader and using it just here, in the dashboard.

@@ -1452,15 +1452,15 @@ const WidgetConfig = ({ workspace, widget, onComplete, closeMenu }) => {
<Button
variant='outlined'
disableElevation
style={{ marginTop: '2.5px', marginLeft: '4px' }}
sx={{ marginLeft: 1 }}
Copy link
Member Author

Choose a reason for hiding this comment

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

quick styling fix on my way

@@ -103,6 +104,9 @@ const PublicDashboards = () => {
const { t_i18n } = useFormatter();
const { isFeatureEnable } = useHelper();

const { setTitle } = useConnectedDocumentModifier();
setTitle(t_i18n('Public dashboards'));
Copy link
Member Author

@labo-flg labo-flg Dec 26, 2024

Choose a reason for hiding this comment

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

unrelated fix on the way : tab title was Dashboard_public

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.39%. Comparing base (537ff33) to head (ed18e55).

Additional details and impacted files
@@              Coverage Diff               @@
##           release/6.5.0    #9464   +/-   ##
==============================================
  Coverage          65.38%   65.39%           
==============================================
  Files                626      626           
  Lines              60127    60127           
  Branches            6767     6768    +1     
==============================================
+ Hits               39313    39318    +5     
+ Misses             20814    20809    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant