Commit Graph

62 Commits

Author SHA1 Message Date
Sanne de Vries
7ab1d0eb40 Added more visual contrast to publish button 2022-08-04 17:57:40 +02:00
Kevin Ansfield
f03041929f 🐛 Fixed schedule post date picker sometimes not allowing "today" to be selected
no issue

- with large site timezone UTC offsets it could happen that "today" in the site timezone is not selectable in the date picker when scheduling posts
- the problem occurred because we were passing a minimum date to the date picker in UTC which was then converted to a local date using just the "YYYY-MM-DD" data but that would not always be correct because the UTC date could be "tomorrow" compared to the site timezone. Passing in the minimum date in the site timezone rather than UTC ensures the minimum date always matches "today" in the site timezone
2022-07-01 11:20:26 +01:00
Kevin Ansfield
100dea6d98 🐛 Fixed scheduled post datepicker sometimes picking day before selected date
no issue

- in sites with a timezone that is negatively offset from UTC at certain times of day when the equivalent UTC date would be the next day, selecting a date when scheduling a post would select a day before the selected date
- fixed the date adjustment when applying the selected date to properly take timezones into account
2022-07-01 11:20:26 +01:00
Kevin Ansfield
e1dfe3edb0 🎨 Improved save/update button copy in editor (#2413)
no issue

- renamed "Update" to "Unpublish" or "Unschedule" to match the available actions
- renamed "Save" to "Update" and made it always visible but disabled when there are no unsaved changes
- switched <Editor::PublishManagement> to a provider component and extracted `<Editor::PublishButtons>`
  - allows for the management flow to wrap other UI elements and have the yielded actions passed down so the publish/update flow can be opened from more than just the publish/unschedule/unpublish buttons
- added link to "Sent" in editor status that opens the update flow for email-only posts

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-06-01 13:48:33 +01:00
Kevin Ansfield
ed235b374d Increased publish flow acceptance tests
refs https://github.com/TryGhost/Team/issues/1586

- updated `?newsletter_id=id` handling in posts API mock to match the real `?newsletter=slug` behaviour
- added additional publish flow acceptance tests for single/multiple newsletter behaviour, scheduling, and sending
2022-05-31 22:59:20 +01:00
Kevin Ansfield
3f0e46c7b0 Added initial tests for new publish flow
refs https://github.com/TryGhost/Team/issues/1586

- added test helper for enabling/disabling members and helpers for disabling mailgun and newsletters
- added `loginAsRole` helper that alleviates duplication of user+role creation and also handles log-out before log-in so it's easier to mix different role tests within a block that has a default role setup in `beforeEach()`
- cleaned up editor tests that were skipped due to using the old publish flow
- added `Publish flow` acceptance test suite with an initial batch of tests
2022-05-30 19:12:16 +01:00
Djordje Vlaisavljevic
ac52e01977 Put less emphasis on the "Send test email" button 2022-05-30 12:42:13 +02:00
Kevin Ansfield
b9707a2b4a Moved logic for publish confirm button text states into backing class (#2397)
refs a021553203

- keeps text and logic together, avoids duplication of button code just for changing the running/success text
- added a `buttonTextMap` to keep the high-level text states in one place
- added `publishType` getter for easier switching between states in other getters and to have one place for the logic
- updated `confirmButtonText` getter and added `confirmRunningText` and `confirmSuccessText` getters that read from the button text map so the pattern used for getting text to pass as arguments in the template is consistent
2022-05-27 11:45:40 +01:00
James Morris
2f85bd6ea4 Fixed the button positions and spacings for the Publish, Save and Sidebar icons in the editor
no issue
2022-05-26 13:47:38 +01:00
Sanne de Vries
5edc95d96d Fixed dark mode issues in publishing flow 2022-05-25 10:23:11 +02:00
Kevin Ansfield
a09a1939c7 Fixed linter errors in editor preview templates 2022-05-25 09:13:08 +01:00
Kevin Ansfield
f76d7e9cd2 Renamed editor-labs component directory to editor
no issue

- cleanup now the old publish flow is no more
2022-05-25 09:13:08 +01:00