mirror of
https://github.com/discourse/discourse.git
synced 2025-05-18 05:13:12 +08:00
DEV: Rename components GlimmerHeader -> Header (#26466)
Originally we planned to do this rename after dropping the old widget implementation. However, as we continue rolling out the update, there is a risk that people will start depending on the component names (e.g. for modifyClass) so it seems best to make the rename now to reduce risk later.
This commit is contained in:
parent
bd85dc40a0
commit
f2e7909a80
@ -13,7 +13,7 @@ import { isDocumentRTL } from "discourse/lib/text-direction";
|
|||||||
import { isTesting } from "discourse-common/config/environment";
|
import { isTesting } from "discourse-common/config/environment";
|
||||||
import discourseLater from "discourse-common/lib/later";
|
import discourseLater from "discourse-common/lib/later";
|
||||||
import { bind, debounce } from "discourse-common/utils/decorators";
|
import { bind, debounce } from "discourse-common/utils/decorators";
|
||||||
import GlimmerHeader from "./glimmer-header";
|
import Header from "./header";
|
||||||
|
|
||||||
let _menuPanelClassesToForceDropdown = [];
|
let _menuPanelClassesToForceDropdown = [];
|
||||||
const PANEL_WIDTH = 340;
|
const PANEL_WIDTH = 340;
|
||||||
@ -438,7 +438,7 @@ export default class GlimmerSiteHeader extends Component {
|
|||||||
}}
|
}}
|
||||||
{{didInsert this.setupHeader}}
|
{{didInsert this.setupHeader}}
|
||||||
>
|
>
|
||||||
<GlimmerHeader
|
<Header
|
||||||
@canSignUp={{@canSignUp}}
|
@canSignUp={{@canSignUp}}
|
||||||
@showSidebar={{@showSidebar}}
|
@showSidebar={{@showSidebar}}
|
||||||
@sidebarEnabled={{@sidebarEnabled}}
|
@sidebarEnabled={{@sidebarEnabled}}
|
||||||
|
@ -10,12 +10,12 @@ import DAG from "discourse/lib/dag";
|
|||||||
import scrollLock from "discourse/lib/scroll-lock";
|
import scrollLock from "discourse/lib/scroll-lock";
|
||||||
import DiscourseURL from "discourse/lib/url";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||||
import AuthButtons from "./glimmer-header/auth-buttons";
|
import AuthButtons from "./header/auth-buttons";
|
||||||
import Contents from "./glimmer-header/contents";
|
import Contents from "./header/contents";
|
||||||
import HamburgerDropdownWrapper from "./glimmer-header/hamburger-dropdown-wrapper";
|
import HamburgerDropdownWrapper from "./header/hamburger-dropdown-wrapper";
|
||||||
import Icons from "./glimmer-header/icons";
|
import Icons from "./header/icons";
|
||||||
import SearchMenuWrapper from "./glimmer-header/search-menu-wrapper";
|
import SearchMenuWrapper from "./header/search-menu-wrapper";
|
||||||
import UserMenuWrapper from "./glimmer-header/user-menu-wrapper";
|
import UserMenuWrapper from "./header/user-menu-wrapper";
|
||||||
|
|
||||||
const SEARCH_BUTTON_ID = "search-button";
|
const SEARCH_BUTTON_ID = "search-button";
|
||||||
|
|
@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
|||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
import { schedule } from "@ember/runloop";
|
import { schedule } from "@ember/runloop";
|
||||||
import { PANEL_WRAPPER_ID } from "discourse/widgets/header";
|
import { PANEL_WRAPPER_ID } from "discourse/widgets/header";
|
||||||
import PanelPortal from "./glimmer-header/panel-portal";
|
import PanelPortal from "./header/panel-portal";
|
||||||
|
|
||||||
export default class LegacyHeaderIconShim extends Component {
|
export default class LegacyHeaderIconShim extends Component {
|
||||||
@tracked panelElement;
|
@tracked panelElement;
|
||||||
|
@ -9,10 +9,10 @@ import {
|
|||||||
import { addPluginDocumentTitleCounter } from "discourse/components/d-document";
|
import { addPluginDocumentTitleCounter } from "discourse/components/d-document";
|
||||||
import { addToolbarCallback } from "discourse/components/d-editor";
|
import { addToolbarCallback } from "discourse/components/d-editor";
|
||||||
import { addCategorySortCriteria } from "discourse/components/edit-category-settings";
|
import { addCategorySortCriteria } from "discourse/components/edit-category-settings";
|
||||||
import { headerButtonsDAG } from "discourse/components/glimmer-header";
|
|
||||||
import { headerIconsDAG } from "discourse/components/glimmer-header/icons";
|
|
||||||
import { forceDropdownForMenuPanels as glimmerForceDropdownForMenuPanels } from "discourse/components/glimmer-site-header";
|
import { forceDropdownForMenuPanels as glimmerForceDropdownForMenuPanels } from "discourse/components/glimmer-site-header";
|
||||||
import { addGlobalNotice } from "discourse/components/global-notice";
|
import { addGlobalNotice } from "discourse/components/global-notice";
|
||||||
|
import { headerButtonsDAG } from "discourse/components/header";
|
||||||
|
import { headerIconsDAG } from "discourse/components/header/icons";
|
||||||
import { _addBulkButton } from "discourse/components/modal/topic-bulk-actions";
|
import { _addBulkButton } from "discourse/components/modal/topic-bulk-actions";
|
||||||
import MountWidget, {
|
import MountWidget, {
|
||||||
addWidgetCleanCallback,
|
addWidgetCleanCallback,
|
||||||
|
@ -54,7 +54,7 @@ export default function renderTopicFeaturedLink(topic) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// deprecated per components/glimmer-header/topic/featured-link.gjs
|
// deprecated per components/header/topic/featured-link.gjs
|
||||||
export function topicFeaturedLinkNode(topic) {
|
export function topicFeaturedLinkNode(topic) {
|
||||||
const meta = extractLinkMeta(topic);
|
const meta = extractLinkMeta(topic);
|
||||||
if (meta) {
|
if (meta) {
|
||||||
|
@ -2,8 +2,8 @@ import { schedule } from "@ember/runloop";
|
|||||||
import { hbs } from "ember-cli-htmlbars";
|
import { hbs } from "ember-cli-htmlbars";
|
||||||
import $ from "jquery";
|
import $ from "jquery";
|
||||||
import { h } from "virtual-dom";
|
import { h } from "virtual-dom";
|
||||||
import { headerButtonsDAG } from "discourse/components/glimmer-header";
|
import { headerButtonsDAG } from "discourse/components/header";
|
||||||
import { headerIconsDAG } from "discourse/components/glimmer-header/icons";
|
import { headerIconsDAG } from "discourse/components/header/icons";
|
||||||
import { addExtraUserClasses } from "discourse/helpers/user-avatar";
|
import { addExtraUserClasses } from "discourse/helpers/user-avatar";
|
||||||
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
||||||
import scrollLock from "discourse/lib/scroll-lock";
|
import scrollLock from "discourse/lib/scroll-lock";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// deprecated in favor of components/glimmer-header/home-logo.gjs
|
// deprecated in favor of components/header/home-logo.gjs
|
||||||
import { h } from "virtual-dom";
|
import { h } from "virtual-dom";
|
||||||
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
||||||
import DiscourseURL from "discourse/lib/url";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Deprecated in favor of app/assets/javascripts/discourse/app/components/glimmer-header/sidebar-toggle.gjs
|
// Deprecated in favor of app/assets/javascripts/discourse/app/components/header/sidebar-toggle.gjs
|
||||||
import { createWidget } from "discourse/widgets/widget";
|
import { createWidget } from "discourse/widgets/widget";
|
||||||
|
|
||||||
export default createWidget("sidebar-toggle", {
|
export default createWidget("sidebar-toggle", {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// deprecated in favor of app/components/glimmer-header/user-dropdown/user-status-bubble.gjs
|
// deprecated in favor of app/components/header/user-dropdown/user-status-bubble.gjs
|
||||||
|
|
||||||
import { createWidget } from "discourse/widgets/widget";
|
import { createWidget } from "discourse/widgets/widget";
|
||||||
import I18n from "discourse-i18n";
|
import I18n from "discourse-i18n";
|
||||||
|
@ -18,8 +18,8 @@ import {
|
|||||||
cleanUpComposerUploadPreProcessor,
|
cleanUpComposerUploadPreProcessor,
|
||||||
} from "discourse/components/composer-editor";
|
} from "discourse/components/composer-editor";
|
||||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||||
import { clearExtraHeaderButtons as clearExtraGlimmerHeaderButtons } from "discourse/components/glimmer-header";
|
import { clearExtraHeaderButtons as clearExtraGlimmerHeaderButtons } from "discourse/components/header";
|
||||||
import { clearExtraHeaderIcons as clearExtraGlimmerHeaderIcons } from "discourse/components/glimmer-header/icons";
|
import { clearExtraHeaderIcons as clearExtraGlimmerHeaderIcons } from "discourse/components/header/icons";
|
||||||
import { clearBulkButtons } from "discourse/components/modal/topic-bulk-actions";
|
import { clearBulkButtons } from "discourse/components/modal/topic-bulk-actions";
|
||||||
import { resetWidgetCleanCallbacks } from "discourse/components/mount-widget";
|
import { resetWidgetCleanCallbacks } from "discourse/components/mount-widget";
|
||||||
import { resetDecorators as resetPluginOutletDecorators } from "discourse/components/plugin-connector";
|
import { resetDecorators as resetPluginOutletDecorators } from "discourse/components/plugin-connector";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { getOwner } from "@ember/application";
|
import { getOwner } from "@ember/application";
|
||||||
import { render } from "@ember/test-helpers";
|
import { render } from "@ember/test-helpers";
|
||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import HomeLogo from "discourse/components/glimmer-header/home-logo";
|
import HomeLogo from "discourse/components/header/home-logo";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
|
|
||||||
const bigLogo = "/images/d-logo-sketch.png?test";
|
const bigLogo = "/images/d-logo-sketch.png?test";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user