discourse/app/assets/stylesheets
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
..
common DEV: Convert header to glimmer (#25214) 2024-02-23 11:08:15 -07:00
desktop Revert "UX: allow fullscreen composer on mobile (#25787)" (#25842) 2024-02-23 12:21:26 -05:00
mobile DEV: Convert header to glimmer (#25214) 2024-02-23 11:08:15 -07:00
vendor DEV: FloatKit (#23650) 2023-09-26 13:39:52 +02:00
admin_rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
admin.scss
color_definitions.scss DEV: FloatKit (#23650) 2023-09-26 13:39:52 +02:00
common.scss FIX: allow styling of feedback on mobile (#25072) 2023-12-30 08:57:16 +11:00
desktop_rtl.scss
desktop.scss
embed.scss FIX: Broken hashtags on embed and publish pages (#24210) 2023-11-02 11:43:55 +10:00
ember_cli.scss
mobile_rtl.scss
mobile.scss
publish.scss FIX: Broken hashtags on embed and publish pages (#24210) 2023-11-02 11:43:55 +10:00
qunit-custom.scss DEV: QUnit CSS tweaks (#24180) 2023-10-31 14:53:42 +01:00
qunit.scss DEV: Add dark theme support to QUnit (#19014) 2022-11-17 18:44:44 +01:00
wcag.scss A11Y: Fix sidebar toggle icon color contrast (#25225) 2024-01-11 09:22:41 -05:00
wizard_rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
wizard.scss DEV: move the margin to 'configure more' link on the setup wizard (#25626) 2024-02-09 13:55:50 -07:00