discourse/app/assets/stylesheets/common
Isaac Janzen 21f23cc032
DEV: Convert header to glimmer (#25214)
Here is a breakdown of the changes that will be implemented in this PR.

# Widgets -> Glimmer

Obviously, the intention of the todo here is to convert the header from widgets to glimmer. This PR splits the respective widgets as so:

### widgets/site-header.js
```mermaid height=200
flowchart TB
    A[widgets/site-header.js] 
    A-->B[components/glimmer-site-header.gjs]
```

### widgets/header.js and children
```mermaid height=200
flowchart TB
    A[widgets/header.js] 
    A-->B[components/glimmer-header.gjs]
    B-->C[glimmer-header/contents.gjs]
    C-->D[./auth-buttons.gjs]
    C-->E[./icons.gjs]
    C-->F[./user-menu-wrapper.gjs]
    C-->G[./hamburger-dropdown-wrapper.gjs]
    C-->H[./user-menu-wrapper.gjs]
    C-->I[./sidebar-toggle.gjs]
    C-->J[./topic/info.gjs]
```

There are additional components rendered within the `glimmer-header/*` components, but I will leave those out for now. From this view you can see that we split apart the logic of `widgets/header.js` into 10+ components. Breaking apart these mega files has many benefits (readability, etc).

# Services

I have introduced a [header](cdb42caa04/app/assets/javascripts/discourse/app/services/header.js) service. This simplifies how we pass around data in the header, as well as fixes a bug we have with "swiping" menu panels.


# Modifiers
Added a [close-on-click-outside](cdb42caa04/app/assets/javascripts/discourse/app/modifiers/close-on-click-outside.js) modifier that is built upon the [close-on-click-outside modifier](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/float-kit/addon/modifiers/close-on-click-outside.js) that @jjaffeux built for float-kit. I think we could replace float-kit's implementation with mine and have it in a centralized location as they are extremely similar.

# Tests
Rewrote the existing header tests ([1](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/tests/integration/components/widgets/header-test.js), [2](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/tests/integration/components/site-header-test.js)) as system tests. 

# Other
- Converted `widgets/user-status-bubble.js` to a gjs component
- Converted `widgets/sidebar-toggle.js` to a gjs component
- Converted `topicFeaturedLinkNode()` to a gjs component
- Deprecated the [docking mixin](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/mixins/docking.js)
2024-02-23 11:08:15 -07:00
..
admin DEV: update classes, remove unused CSS (#25825) 2024-02-23 09:14:37 -05:00
base DEV: Convert header to glimmer (#25214) 2024-02-23 11:08:15 -07:00
components DEV: update classes, remove unused CSS (#25825) 2024-02-23 09:14:37 -05:00
float-kit FIX: Position Float Kit elements correctly in RTL mode (#24908) 2023-12-15 13:16:31 +03:00
foundation UX: Update selected colour var (#25500) 2024-01-31 09:32:38 +01:00
login UX: cleaning up some invite page styles (#25247) 2024-01-12 17:15:01 -05:00
modal WIP: Experiemental Bulk Topic Actions Dropdown (#25245) 2024-01-25 09:12:06 -07:00
select-kit UX: Add "filter for more" to icon picker (#25263) 2024-01-23 21:53:13 +01:00
table-builder DEV: update classes, remove unused CSS (#25825) 2024-02-23 09:14:37 -05:00
d-editor.scss FIX: Form template form error visiblity (#24779) 2023-12-07 12:26:56 -08:00
font-variables.scss FIX: Use rem for font sizes in post headings (#13720) 2021-07-14 11:15:58 +10:00
input_tip.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
loading-slider.scss FIX: better supports ipad and hub footer nav (#25518) 2024-02-01 10:24:44 +01:00
post-action-feedback.scss FIX: allow styling of feedback on mobile (#25072) 2023-12-30 08:57:16 +11:00
printer-friendly.scss FEATURE: remove category badge style options, set bullet style as default (#24198) 2023-11-13 10:46:15 -05:00
software-update-prompt.scss REFACTOR: move shadow vars to css custom props (#22094) 2023-06-13 16:38:31 -04:00
topic-entrance.scss REFACTOR: move shadow vars to css custom props (#22094) 2023-06-13 16:38:31 -04:00
topic-timeline.scss UX: improve touch, swipe, panning performance on mobile menus (#23775) 2023-10-16 11:27:00 -07:00
whcm.scss A11Y: Improve accessibility in WHCM themes (#18606) 2022-10-17 07:07:46 -07:00