Skip to content

Deleted old Ember settings pages#18740

Merged
binary-koan merged 4 commits into
mainfrom
delete-old-settings
Nov 6, 2023
Merged

Deleted old Ember settings pages#18740
binary-koan merged 4 commits into
mainfrom
delete-old-settings

Conversation

@binary-koan

@binary-koan binary-koan commented Oct 24, 2023

Copy link
Copy Markdown
Contributor

refs https://github.com/TryGhost/Product/issues/4055


🤖 Generated by Copilot at 3b24693

Removed unused components related to announcement settings, custom theme settings, and file upload. These components were part of a deprecated feature or a legacy UI.

@binary-koan binary-koan self-assigned this Oct 24, 2023
@binary-koan binary-koan marked this pull request as draft October 24, 2023 12:56
@codecov

codecov Bot commented Oct 24, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ad7efbe) 69.10% compared to head (db44f2f) 72.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18740      +/-   ##
==========================================
+ Coverage   69.10%   72.86%   +3.75%     
==========================================
  Files        1394     1250     -144     
  Lines       76877    72442    -4435     
  Branches    10187     9594     -593     
==========================================
- Hits        53129    52785     -344     
+ Misses      22952    18879    -4073     
+ Partials      796      778      -18     
Flag Coverage Δ
admin-tests 41.11% <ø> (+7.11%) ⬆️
e2e-tests 81.60% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
ghost/admin/app/services/ui.js 70.96% <ø> (-0.31%) ⬇️

... and 4 files with indirect coverage changes

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

@binary-koan binary-koan marked this pull request as ready for review October 31, 2023 08:57
@daniellockyer

Copy link
Copy Markdown
Contributor

❤️

@binary-koan binary-koan merged commit e8e0d84 into main Nov 6, 2023
@binary-koan binary-koan deleted the delete-old-settings branch November 6, 2023 06:46
sagzy added a commit that referenced this pull request Jul 2, 2026
…29041)

ref https://linear.app/ghost/issue/ONC-1873

## Problem

A customer reported that the admin URL for a staff user's profile used
to follow slug changes automatically, but no longer does.

The old Ember staff screen rewrote the browser URL via `replaceState`
whenever a user's slug was saved, so refresh, back button and bookmarks
kept working after a rename. That behaviour was lost when staff
management moved to the React settings app (#18740):

- After saving a slug change, the address bar stayed on
`#/settings/staff/old-slug` — a dead URL on the next refresh, which
rendered a silent blank (the modal component returns `null` when the
slug lookup fails).
- Changing **your own** slug was worse: the modal decides how to load
data by comparing `currentUser.slug` against the URL param. Saving
updates the shared current-user cache immediately, the comparison flips,
the fetch by the (now stale) URL slug finds nothing, and the profile
modal silently unmounts right after hitting Save.

## Solution

- Added a `replace` option to the legacy routing provider's
`updateRoute`, implemented with `history.replaceState` + a synthetic
`hashchange`, mirroring the old Ember behaviour so a slug rename swaps
the history entry instead of pushing a dead one.
- After a successful save, the user detail modal updates the route to
the **server-returned** slug (the API may sanitize the submitted value),
preserving the active tab.
- The modal keeps showing the last loaded user while the refetch by the
new slug is in flight, so it no longer unmounts mid-save.
- Opening a stale/unknown staff slug URL now shows a "User not found"
toast and navigates back to the staff list instead of rendering nothing.
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