discourse/app/assets/stylesheets/common
Martin Brennan 3e3f3f7b7e
DEV: Add time shortcut picker component and libs and refactor bookmark modal controller into component which uses time shortcut picker (#11802)
This PR moves all of the time picking functionality from the bookmark modal and controller into a reusable time-shortcut-picker component, which will be used for the topic timer UI revamp. All of the utility JS for getting dates like tomorrow/next week/next month etc. have also been moved into a separate utility lib.

The time-shortcut-picker has a couple of options that can be passed in:

* prefilledDatetime - The date and time to parse and prefill into the custom date and time section, useful for editing interfaces.
* onTimeSelected (callback) - Called when one of the time shortcuts is clicked, and passes the type of the shortcut (e.g. tomorrow) and the datetime selected.
* additionalOptionsToShow - An array of option ids to show (by default `later_today` and `later_this_week` are hidden)
* hiddenOptions - An array of option ids to hide
* customOptions - An array of custom options to display (e.g. the option to select a post date for the bookmarks modal). The options should have the below properties:
    * id
    * icon
    * label (I18n key)
    * time (moment datetime object)
    * timeFormatted
    * hidden

The other major work in this PR is moving all of the bookmark functionality out of the bookmark modal controller and into its own component, where it makes more sense to be able to access elements on the page via `document`. Tests have been added to accompany this move, and existing acceptance tests for bookmark are all passing.
2021-02-01 09:03:41 +10:00
..
admin FEATURE: Add new features section in admin dashboard (#11731) 2021-01-22 10:09:02 -05:00
base ensure topic footer buttons are the same height (#11875) 2021-01-27 21:40:45 -05:00
components DEV: Add time shortcut picker component and libs and refactor bookmark modal controller into component which uses time shortcut picker (#11802) 2021-02-01 09:03:41 +10:00
foundation DEV: Cleanup variables/mixins SCSS imports (#11618) 2021-01-05 14:05:34 -05:00
select-kit UX: Use uniform style for tag counts (#11743) 2021-01-18 15:11:23 -05:00
d-editor.scss UX: Allow some overflow in composer preview (#11902) 2021-01-29 20:28:56 -05:00
input_tip.scss DEV: Cleanup variables/mixins SCSS imports (#11618) 2021-01-05 14:05:34 -05:00
printer-friendly.scss UX: remove timeline from print view, fix header in crawler view (#11489) 2020-12-15 16:12:46 -05:00
topic-entrance.scss fix topic entrance button layout (#11887) 2021-01-28 15:44:01 -05:00
topic-timeline.scss REFACTOR: Remove position fixed from the header and use sticky instead (#10781) 2020-10-19 17:26:38 -04:00