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

feat: Make the Delete action consistently the last one #1788

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You can also check the
- Features
- Added most recent charts (all time and last 30 days) to the the Statistics
page
- Made the Delete chart menu action always the last one across all Menu items
- Fixes
- Fixed inconsistent text style behavior in title and description fields

Expand Down
12 changes: 6 additions & 6 deletions app/components/chart-shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ export const ChartMoreButton = ({
chartConfig={chartConfig}
onSuccess={handleClose}
/>
{chartConfig.chartType !== "table" ? (
<TableViewChartMenuActionItem
chartType={chartConfig.chartType}
onSuccess={handleClose}
/>
) : null}
{state.chartConfigs.length > 1 ? (
<MenuActionItem
type="button"
Expand All @@ -204,12 +210,6 @@ export const ChartMoreButton = ({
label={<Trans id="chart-controls.delete">Delete</Trans>}
/>
) : null}
{chartConfig.chartType !== "table" ? (
<TableViewChartMenuActionItem
chartType={chartConfig.chartType}
onSuccess={handleClose}
/>
) : null}
</div>
)}
</ArrowMenuTopBottom>
Expand Down
Loading