mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 09:31:57 +08:00
@ -96,7 +96,7 @@ function lazyLoadHelpers(hbs, owner) {
|
|||||||
hbs.registerHelper("helperMissing", function (...args) {
|
hbs.registerHelper("helperMissing", function (...args) {
|
||||||
const opts = args[args.length - 1];
|
const opts = args[args.length - 1];
|
||||||
if (opts?.name) {
|
if (opts?.name) {
|
||||||
// Lookup and evaluate the relevant module. Raw helpers may be registed as a side effect
|
// Lookup and evaluate the relevant module. Raw helpers may be registered as a side effect
|
||||||
owner.lookup(`helper:${opts.name}`);
|
owner.lookup(`helper:${opts.name}`);
|
||||||
|
|
||||||
if (hbs.helpers[opts.name]) {
|
if (hbs.helpers[opts.name]) {
|
||||||
|
@ -1934,7 +1934,7 @@ class PluginApi {
|
|||||||
/**
|
/**
|
||||||
* Allows for manipulation of the header icons. This includes, adding, removing, or modifying the order of icons.
|
* Allows for manipulation of the header icons. This includes, adding, removing, or modifying the order of icons.
|
||||||
*
|
*
|
||||||
* Only the passing of components is supported, and by default the icons are added to the left of exisiting icons.
|
* Only the passing of components is supported, and by default the icons are added to the left of existing icons.
|
||||||
*
|
*
|
||||||
* Example: Add the chat icon to the header icons after the search icon
|
* Example: Add the chat icon to the header icons after the search icon
|
||||||
* ```
|
* ```
|
||||||
@ -1984,7 +1984,7 @@ class PluginApi {
|
|||||||
/**
|
/**
|
||||||
* Allows for manipulation of the header buttons. This includes, adding, removing, or modifying the order of buttons.
|
* Allows for manipulation of the header buttons. This includes, adding, removing, or modifying the order of buttons.
|
||||||
*
|
*
|
||||||
* Only the passing of components is supported, and by default the buttons are added to the left of exisiting buttons.
|
* Only the passing of components is supported, and by default the buttons are added to the left of existing buttons.
|
||||||
*
|
*
|
||||||
* Example: Add a `foo` button to the header buttons after the auth buttons
|
* Example: Add a `foo` button to the header buttons after the auth buttons
|
||||||
* ```
|
* ```
|
||||||
@ -3032,7 +3032,7 @@ class PluginApi {
|
|||||||
* @param {string} opts.class
|
* @param {string} opts.class
|
||||||
* @param {buttonVisibilityCallback} opts.visible
|
* @param {buttonVisibilityCallback} opts.visible
|
||||||
* @param {buttonAction} opts.action
|
* @param {buttonAction} opts.action
|
||||||
* @param {string} opts.actionType - type of the action, either performanAndRefresh or setComponent
|
* @param {string} opts.actionType - type of the action, either performAndRefresh or setComponent
|
||||||
*/
|
*/
|
||||||
addBulkActionButton(opts) {
|
addBulkActionButton(opts) {
|
||||||
addBulkDropdownButton(opts);
|
addBulkDropdownButton(opts);
|
||||||
|
@ -118,7 +118,7 @@ export default class SwipeEvents {
|
|||||||
this.element.addEventListener("touchcancel", this.touchCancel, opts);
|
this.element.addEventListener("touchcancel", this.touchCancel, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove touch listeners to be called by client on destory
|
// Remove touch listeners to be called by client on destroy
|
||||||
removeTouchListeners() {
|
removeTouchListeners() {
|
||||||
this.element.removeEventListener("touchstart", this.touchStart);
|
this.element.removeEventListener("touchstart", this.touchStart);
|
||||||
this.element.removeEventListener("touchmove", this.touchMove);
|
this.element.removeEventListener("touchmove", this.touchMove);
|
||||||
|
@ -25,7 +25,7 @@ export async function waitForClosedKeyboard(context) {
|
|||||||
new Promise((resolve) => {
|
new Promise((resolve) => {
|
||||||
timeout = setTimeout(() => {
|
timeout = setTimeout(() => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.warn("Keyboard visibility didnt change after 1s.");
|
console.warn("Keyboard visibility didn't change after 1s.");
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -21,7 +21,7 @@ export const CRITICAL_DEPRECATIONS = [
|
|||||||
/^(?!discourse\.)/, // All unsilenced ember deprecations
|
/^(?!discourse\.)/, // All unsilenced ember deprecations
|
||||||
];
|
];
|
||||||
|
|
||||||
// Deprecation handling APIs don't have any way to unregister handlers, so we set up permenant
|
// Deprecation handling APIs don't have any way to unregister handlers, so we set up permanent
|
||||||
// handlers and link them up to the application lifecycle using module-local state.
|
// handlers and link them up to the application lifecycle using module-local state.
|
||||||
let handler;
|
let handler;
|
||||||
registerDeprecationHandler((message, opts, next) => {
|
registerDeprecationHandler((message, opts, next) => {
|
||||||
|
@ -3,7 +3,7 @@ import Service from "@ember/service";
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
This service holds the current tooltip displayed when using <DTooltip> component.
|
This service holds the current tooltip displayed when using <DTooltip> component.
|
||||||
All of these tooltips share a commong portal outlet element, which means
|
All of these tooltips share a common portal outlet element, which means
|
||||||
we have to ensure we close them before their html is replaced, otherwise
|
we have to ensure we close them before their html is replaced, otherwise
|
||||||
we end up with a detached element in the DOM and unexpected behavior.
|
we end up with a detached element in the DOM and unexpected behavior.
|
||||||
*/
|
*/
|
||||||
|
@ -33,7 +33,7 @@ module("Discourse Chat | Component | chat-channel-row", function (hooks) {
|
|||||||
assert.dom(".chat-channel-row").hasAttribute("tabindex", "0");
|
assert.dom(".chat-channel-row").hasAttribute("tabindex", "0");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("channel data attrite tabbing", async function (assert) {
|
test("channel id data attribute", async function (assert) {
|
||||||
await render(hbs`<ChatChannelRow @channel={{this.categoryChatChannel}} />`);
|
await render(hbs`<ChatChannelRow @channel={{this.categoryChatChannel}} />`);
|
||||||
|
|
||||||
assert
|
assert
|
||||||
|
Reference in New Issue
Block a user