discourse/app/assets/stylesheets/common/components
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
..
_index.scss DEV: Use indexes when importing SCSS from a folder (#11591) 2020-12-30 15:29:10 -05:00
badges.scss UX: ensures new-topic badge renders consistently 2020-09-23 23:32:19 +08:00
banner.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
bookmark-list.scss FIX: Bookmark search fixes (#10239) 2020-07-17 15:55:07 +10:00
bookmark-modal.scss 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
buttons.scss REFACTOR: Convert buttons to flexbox (#11785) 2021-01-27 16:17:08 -05:00
conditional-loading-section.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
convert-to-public-topic-modal.scss FEATURE: Allow choice of category when making a PM public (#7907) 2019-07-19 11:52:50 -04:00
date-input.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
date-picker.scss UX: general cleanup of inputs, buttons and select elements - part 1 2018-09-19 20:37:04 +08:00
date-time-input-range.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
date-time-input.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
footer-nav.scss DEV: Fix position of filtered replies notice on DiscourseHub (#11462) 2020-12-10 13:25:09 -05:00
group-member-dropdown.scss Replace deprecated dropdown-button with DropdownSelectBoxComponent (#6451) 2018-10-05 09:48:17 -04:00
groups-form-membership-fields.scss UX: Make group membership UI clearer (#8210) 2019-10-17 18:05:42 +01:00
hashtag.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
iframed-html.scss Merge pull request from GHSA-vw39-6w7q-gfx5 2020-02-27 11:47:15 -06:00
ignored-user-list.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
keyboard_shortcuts.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
navs.scss REFACTOR: Convert buttons to flexbox (#11785) 2021-01-27 16:17:08 -05:00
share-and-invite-modal.scss UX: inform staff users that new users will be auto-approved on invite (#11062) 2020-10-30 08:41:14 +05:30
svg.scss FIX: Limit previous IE SVG click event fix 2018-12-28 10:18:53 -05:00
tap-tile.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
time-input.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
user-card.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
user-info.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
user-stream-item.scss DEV: makes user-stream an unordered list (#11770) 2021-01-20 15:57:38 +01:00
user-stream.scss FIX: Fixed deleted posts layout (#7348) 2019-04-10 19:00:39 +02:00
widget-dropdown.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00