Commit Graph

3434 Commits

Author SHA1 Message Date
Kevin Ansfield
3d6fae3ea7
Fixed intermittent click issues with internal links dropdown (#20101)
closes https://linear.app/tryghost/issue/MOM-60

- when the dropdown opens near the end of the document, clicking the links sometimes did nothing and showed an error in the console
- we have a mousedown event handler on an element that surrounds the main editing element that re-focuses the editor when clicked in order to make the "focus editor" click target larger and more natural-feeling but it was inadvertently re-focusing when the mousedown event fired for an element in the dropdown list when the list was positioned outside of the main editor element. This lead to timing issues with the bookmark node being removed on blur because it was empty followed by an error from the node's component's async event handlers which were trying to set values on the now-removed node
- by switching from `event.target.closest()` to looping over `event.composedPath()` when checking to see if we should skip re-focusing we're more resilient to DOM manipulations occurring between event triggers and function calls because we'll always be given the list of elements that existed at the time the event fired
2024-04-29 17:58:33 +01:00
Djordje Vlaisavljevic
7a3bbfde10
Added ActivityPub playground (#20081)
ref MOM61

- Adds admin-x react app we’ll use as ActivityPub playground to the
sidebar nav behind the feature flag.
- Wired up routing to Ember
- Setup the project as `admin-x-activitypub`

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2024-04-25 16:44:29 +08:00
Sanne de Vries
a2bbe6b3c3
Updated 'Users' to 'Staff' in search dropdown component (#20064)
No ref

- This copy change allows us to use consistent copy in both the general
search as well as the internal linking search component in the editor.
2024-04-22 14:49:43 +00:00
Kevin Ansfield
8dac340492
Updated editor link search to group results (#20058)
closes https://linear.app/tryghost/issue/MOM-49

- bumped koenig-lexical so the bookmark card has group support for testing
- updated `searchLinks` function passed to Koenig to match expected grouped results shape
2024-04-22 05:35:18 +00:00
Kevin Ansfield
7132619115
Fixed internal linking not correctly filtering to published-only (#20054)
no issue

- updated search to add `status` to the search results
- added filtering to the editor's `searchLinks()` method
- prevented TaskCancellation errors being thrown from the search task being cast to a Promise
2024-04-18 17:18:37 +00:00
Chris Raible
a10b13916a
🐛 Fixed admin error when deleting an unsaved or imported post (#20053)
ref
https://linear.app/tryghost/issue/ENG-845/error-attempted-to-set-lexical-on-the-deleted-record
ref
[https://linear.app/tryghost/issue/ENG-854/🐛-deleting-imported-posts-makes-ghost-unresponsive](https://linear.app/tryghost/issue/ENG-854/%F0%9F%90%9B-deleting-imported-posts-makes-ghost-unresponsive)

- When deleting a post in the editor's Post Settings Menu, if the post
has unsaved changes (indicated by the hasDirtyAttributes property in the
editor), Admin will crash because it tries to save a post revision
before leaving the editor, but the post has already been deleted so
saving fails.
- This can occur when editing a post and quickly deleting it from the
Post Settings Menu before saving is completed.
- It can also occur when attempting to delete an imported post, as the
editor will parse the lexical from the server and may make some minor,
invisible-to-the-user changes to the lexical string locally (e.g. JSON
formatting, or updating the JSON to use extended version of base lexical
nodes), which triggers the same error.
- This fix bypasses the attempt to save a post revision when leaving the
editor if the post is already deleted, which allows the transition back
to the Posts route to succeed.
2024-04-18 10:02:02 -07:00
Kevin Ansfield
96adb0a5d8
Wired up bookmark card internal linking proof of concept (#20044)
closes https://linear.app/tryghost/issue/MOM-1/

- added `feature.internalLinking` and `searchLinks` properties to the `cardConfig` object passed to the editor
- `searchLinks()` uses Admin's internal search to fetch and filter results
  - called with no search term to obtain default links to show as soon as the bookmark card is inserted, in our case we show the last 5 published posts. Result is cached for the duration of the editing session to avoid API queries/loading state after the first fetch
  - flattens search results for now because Koenig doesn't yet support grouped results
- bumps version of `@tryghost/koenig-lexical` to support the feature flag
2024-04-18 11:16:19 +00:00
Sodbileg Gansukh
7d42d1473e
Improved long label handling (#20029)
ref DES-205

- label name is now used as the title on label pills instead of static
text
- label names will now be truncated when it takes more than 2 lines
instead of 1
2024-04-17 05:02:21 +00:00
Kevin Ansfield
d6e599dab3
Generalised Admin search for use in editor (#20011)
ref https://linear.app/tryghost/issue/MOM-1

- renamed `searchable` to `groupName` so it better matches usage and avoids leaking internal naming to external clients
- added `url` to the fetched data for each data type as the editor will want to use front-end URLs in content
- added acceptance tests to help avoid regressions as we further generalise/optimise the search behaviour
2024-04-11 14:01:39 +00:00
Kevin Ansfield
a788a9673c
Extracted Admin's search behaviour from component to service (#20008)
ref https://linear.app/tryghost/issue/MOM-1

- pre-requisite to exposing the search behaviour to the editor for internal linking
2024-04-10 11:44:24 +00:00
Djordje Vlaisavljevic
7107b092fd Made Ghost logo background in dark mode match the admin background
close https://linear.app/tryghost/issue/IPC-140/ghost-logo-in-dark-mode-doesnt-perfectly-match-the-background
2024-04-04 12:13:33 +01:00
Ryan Feigenbaum
5aa792c236
Add IDs for metrics (#19981)
REF:
https://linear.app/tryghost/issue/IPC-139/ensure-buttons-have-ids-for-posthog
- Added IDs to facilitate measurement in PH.
2024-04-03 14:35:18 -04:00
Daniël van der Winden
c384b79d33
Removed a word from an onboarding step (#19980)
Deleted "own" in "craft a look that reflects your own brand and style."
2024-04-03 17:03:53 +00:00
Kevin Ansfield
2a119cc4a4
Removed confirmation modal when dismissing onboarding (#19979)
closes https://linear.app/tryghost/issue/IPC-138/skip-onboarding-confirmation

- removed confirmation modal
- changed button to directly call the dismiss action on the onboarding service
2024-04-03 16:46:38 +00:00
Kevin Ansfield
9fb14aab7d
Added background blur to onboarding modals (#19969)
ref https://linear.app/tryghost/issue/IPC-125/modal-and-checklist-misaligned

- added background blur to the share and dismiss modals so the misalignment with non-full-width content is less obvious
2024-04-03 09:39:28 +01:00
Daniël van der Winden
9dcee418a4
Updated onboarding copy and line-height (#19975)
Descenders were being cut off in the titles due to the line-height not
being set right.
2024-04-03 08:34:35 +00:00
Ryan Feigenbaum
12379e7cc5
Update LinkedIn share URL in share-modal.hbs (#19971)
Improve link sharing for LinkedIn
REF:
https://linear.app/tryghost/issue/IPC-131/linkedin-sharing-looks-really-odd
2024-04-02 10:24:37 -04:00
Daniël van der Winden
c7c13a394a
Added subheading to onboarding checklist (#19970) 2024-04-02 13:54:51 +00:00
Kevin Ansfield
98ce6bf4d5
Fixed onboarding checklist video logo autoplay (#19967)
closes https://linear.app/tryghost/issue/IPC-117/fix-ghost-orb-logo-not-being-animated-in-chrome-or-arc

- Chrome wasn't respecting the `muted` attribute when the dashboard is loaded without any interaction resulting in the video not auto playing
- fixed by adding a `{{autoplay}}` modifier that explicitly sets the `muted` property on the video before calling `.play()` which appears to bypass the interaction-required block
2024-04-02 13:55:22 +01:00
Daniël van der Winden
50dceb23ff
Updated class names for Share modal (#19966)
fixes IPC-134

Some class names in the share modal (onboarding) were not in line with
how we define our classes at Ghost.
2024-04-02 11:48:17 +00:00
Djordje Vlaisavljevic
bbb0239ac4 Updated onboarding checklist copy
ref https://linear.app/tryghost/issue/IPC-98/copy-feedback
2024-04-01 17:00:27 +01:00
Djordje Vlaisavljevic
1137926464 Open Design settings modal when clicked from Share modal
close https://linear.app/tryghost/issue/IPC-129/link-to-design-settings-modal-in-share-modal
2024-04-01 17:00:27 +01:00
Ryan Feigenbaum
7a5bb0818b
Fix punctuation in onboarding checklist help message (#19961)
REF: https://linear.app/tryghost/issue/IPC-98/copy-feedback
2024-03-31 11:53:14 -04:00
Ryan Feigenbaum
f5d025d7dd
Update copy for onboarding checklist. (#19960)
REF: https://linear.app/tryghost/issue/IPC-98/copy-feedback
2024-03-31 11:00:44 -04:00
Kevin Ansfield
0cd8547e23
Added confirmation modal to onboarding skip button (#19956)
closes https://linear.app/tryghost/issue/IPC-115/make-skip-onboarding-button-work

- show a confirmation modal when clicking the "Skip onboarding" button
- onboarding is only dismissed when confirm button is clicked in the modal
2024-03-28 17:50:40 +00:00
Daniël van der Winden
dda9ba2462
Updated checklist hovers in dark mode (#19955)
'Skip onboarding' and 'Help Center' hover states were not legible.
2024-03-28 17:01:17 +00:00
Djordje Vlaisavljevic
0b7f3546ac Fixed linting issue
ref https://linear.app/tryghost/issue/IPC-96/add-link-back-to-dashboard-to-post-published-screen
2024-03-28 16:47:53 +00:00
Djordje Vlaisavljevic
c3355d0067 Added link to dashboard on post-published screen
closes https://linear.app/tryghost/issue/IPC-96/add-link-back-to-dashboard-to-post-published-screen

- When the onboardingChecklist feature flag is enabled, hides "Back to editor" link on post-published screen and shows "Back to dashboard" instead. There is already one link back to the editor, and it makes sense to let users go back to the dashboard easily.
2024-03-28 16:47:53 +00:00
Djordje Vlaisavljevic
60b8316bb6 Added more performant way of displaying dark mode animated logo
ref https://linear.app/tryghost/issue/IPC-121/add-dark-mode-version-of-the-animated-ghost-logo
2024-03-28 15:57:26 +00:00
Djordje Vlaisavljevic
ac90c5691d Added a dark mode version of the animated Ghost logo for onboarding
ref https://linear.app/tryghost/issue/IPC-121/add-dark-mode-version-of-the-animated-ghost-logo
2024-03-28 15:57:26 +00:00
Kevin Ansfield
63fa7b1952
Migrated dashboard share modal to modern pattern (#19950)
closes https://linear.app/tryghost/issue/IPC-92/add-logic-for-completing-steps
closes https://linear.app/tryghost/issue/IPC-111/re-work-share-modal-to-use-the-right-pattern

- migrated code over to the modern ember-promise-modals pattern
- added share step completion when opening modal
- removed unnecessary 1sec timeout when clicking "Copy" button
- moved various share URLs into the template so there's less need to look back-and-forth between template and backing class
2024-03-28 15:35:35 +00:00
Kevin Ansfield
1c219fdcb6
Wired onboarding checklist to saved user settings (#19948)
part of https://linear.app/tryghost/issue/IPC-92/add-logic-for-completing-steps
part of https://linear.app/tryghost/issue/IPC-115/make-skip-onboarding-button-work

- updated `onboarding` service to use the `user.accessibility` (poor naming, this is an old field used for general user settings) as it's backing store
- added `onboarding.allStepsCompleted` to allow for "completion" state to be shown before the checklist is marked as completed
- added `onboarding.{complete,dismiss}Checklist()` actions and wired those up to the template

When testing, if you need to reset the checklist you can run this in DevTools console
```
Ember.Namespace.NAMESPACES_BY_ID['ghost-admin'].__container__.lookup('service:onboarding').startChecklist()
```
2024-03-28 14:19:43 +00:00
Kevin Ansfield
90d8b41f63
Wired up in-memory onboarding step completion (#19940)
ref https://linear.app/tryghost/issue/IPC-92/add-logic-for-completing-steps

- added in-memory step completion to `onboarding` service
- wired up the onboarding checklist to mark steps as completed when clicked
- extracted re-used step template and logic into components/helpers
2024-03-27 18:27:43 +00:00
Kevin Ansfield
919ec733e7
Moved onboarding display check into new onboarding service (#19938)
refs
https://linear.app/tryghost/issue/IPC-92/add-logic-for-completing-steps

- added `onboarding` service to manage logic and state for the onboarding display and it's various steps
- added basic "display onboarding checklist" state to replicate the basic feature flag toggle along with making sure it's only shown to owners
- added acceptance test file and missing mirage endpoints needed for the dashboard to load without error
2024-03-27 17:37:37 +00:00
Djordje Vlaisavljevic
71a1d825e3 Added onboarding checklist success state button
ref https://linear.app/tryghost/issue/IPC-91/add-success-state-design
2024-03-27 14:13:29 +00:00
Daniël van der Winden
8757a5deec
Updated the copy link behaviour on the social share modal (#19933) 2024-03-27 12:18:15 +01:00
Sanne de Vries
c39c2de067
Updated time formatting for drafts and scheduled posts (#19924)
Ref TRI-27
- Published posts now show the published date in post list, instead of
updated date.
- The `gh-format-post-time` helper now has a `relative` and `absolute`
and option instead of formatting being tied to `draft` and `published`
state. This allows for more flexibility in how dates are displayed.
- Draft, scheduled and published posts now follow the same time
formatting pattern: today, yesterday, or explicit dates if further in
the past.
- Hover states for dates in the post list have been removed.
- Title attributes are added indicating whether timestamp refers to updated_at or published_at
- The scheduling logic on the publish page still uses relative
formatting.
2024-03-27 11:30:14 +01:00
Daniël van der Winden
3664db491d
Updated social share modal layout (#19925)
- Changed the layout of the modal
- Added a fallback state for the cover image
- Added possibility to copy the publication link
- Correct hover states for social media buttons

---------

Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2024-03-26 19:38:07 +01:00
Ronald Langeveld
db62d83387
Bumped Koenig-Lexical to new minor (#19909)
no issue

- Bumped Koenig-Lexical to a new minor.
- This change contains the new Unsplash selector which is a breaking
change as default headers are handled a touch different.
2024-03-25 20:32:46 +08:00
Djordje Vlaisavljevic
5e631114db Added a thousands separator to tier price on member detail screen
ref https://linear.app/tryghost/issue/DES-152/thousand-separator-missing-in-member-details-tier-price
2024-03-21 14:55:39 +00:00
Djordje Vlaisavljevic
ba7f448e12 Fixed "Read this article" link on the dashboard
ref https://linear.app/tryghost/issue/DES-138/🐛-read-this-article-link-on-dashboard-leads-to-resources-instead
2024-03-21 14:55:39 +00:00
Djordje Vlaisavljevic
7b70b60ad4 Added dynamic site title to the checklist
ref https://linear.app/tryghost/issue/IPC-76/add-static-checklist-to-the-dashboard
2024-03-20 20:39:01 +00:00
Djordje Vlaisavljevic
53310b52c1 Added function for copying publication link
ref https://linear.app/tryghost/issue/IPC-90/add-share-modal
2024-03-20 20:39:01 +00:00
Djordje Vlaisavljevic
aa7d294162 Switched "Copy link" icon to link
ref https://linear.app/tryghost/issue/IPC-90/add-share-modal
2024-03-20 20:39:01 +00:00
Daniël van der Winden
4c598a1e6d
Added social share modal to onboarding checklist (#19891)
Updated the share modal design and functionality

ref IPC-90

• Rebuilt the bookmark card to match other components
• Added linking to the different social networks
• Added a close button that closes the modal
• Removed repetitive subtitle
2024-03-20 16:48:45 +01:00
Djordje Vlaisavljevic
cdf45172a7
Added a fullscreen onboarding checklist to the dashboard (#19888)
ref https://linear.app/tryghost/issue/IPC-66/onboarding-checklist-v1

- Larger, 100vh onboarding checklist that’s currently on the dashboard,
but should be moved to it’s own component and route
- Every step links to the relevant screen, but the logic for completing
steps is missing
2024-03-19 16:07:49 +00:00
Simon Backx
b1c60d20d1
Updated email error button text in case of partial email errors (#19877)
fixes DES-66

In case some batches succeeded sending, the button text will be
different if the email sending was partially successful.

For now this uses text matching with a warning in our E2E tests because
we don't have a straightforward way to check if an error is partial or
not yet.
2024-03-19 10:31:21 +01:00
Djordje Vlaisavljevic
a67342b06a
Add WIP onboarding checklist behind the flag (#19801)
ref https://linear.app/tryghost/issue/IPC-66/onboarding-checklist-v1

- Adds a basic version of a new onboarding checklist behind the feature
flag, without incomplete/complete state logic
- Links to Design settings, Members screen and new post
- Opens amodal that we’ll use as Share modal

---------

Co-authored-by: Daniël van der Winden <danielvanderwinden@ghost.org>
2024-03-18 14:53:01 +00:00
Peter Zimon
9d9707e6f4
Settings keyboard shortcuts (#19836)
ref DES-166

Accessing settings via a keyboard shortcut is a great productivity
booster for advanced users and it is missing from Ghost today.
2024-03-13 08:46:22 +01:00
Daniël van der Winden
f0d6a64f7a
Fixed scrolling issues on members table (#19833)
ref DES-86

Set fixed widths for different columns on the Members table specifically, so content does not jump up & down anymore as you scroll down the page.

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2024-03-11 17:32:10 +01:00