Deleted old Ember settings pages#18740
Merged
Merged
Conversation
3b24693 to
43ac2ea
Compare
43ac2ea to
958e038
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
958e038 to
398ab63
Compare
Contributor
|
❤️ |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.