mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 15:00:09 +08:00
DEV: Remove hashtag deprecations (#27195)
Introduced in
c7860173c1
,
they are no longer necessary once https://github.com/discourse/discourse-encrypt/pull/317
is merged
This commit is contained in:
@ -2,17 +2,7 @@ import { cancel } from "@ember/runloop";
|
|||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { CANCELLED_STATUS } from "discourse/lib/autocomplete";
|
import { CANCELLED_STATUS } from "discourse/lib/autocomplete";
|
||||||
import {
|
import { getHashtagTypeClasses as getHashtagTypeClassesNew } from "discourse/lib/hashtag-type-registry";
|
||||||
decorateHashtags as decorateHashtagsNew,
|
|
||||||
fetchUnseenHashtagsInContext as fetchUnseenHashtagsInContextNew,
|
|
||||||
generatePlaceholderHashtagHTML as generatePlaceholderHashtagHTMLNew,
|
|
||||||
linkSeenHashtagsInContext as linkSeenHashtagsInContextNew,
|
|
||||||
} from "discourse/lib/hashtag-decorator";
|
|
||||||
import {
|
|
||||||
cleanUpHashtagTypeClasses as cleanUpHashtagTypeClassesNew,
|
|
||||||
getHashtagTypeClasses as getHashtagTypeClassesNew,
|
|
||||||
registerHashtagType as registerHashtagTypeNew,
|
|
||||||
} from "discourse/lib/hashtag-type-registry";
|
|
||||||
import { emojiUnescape } from "discourse/lib/text";
|
import { emojiUnescape } from "discourse/lib/text";
|
||||||
import {
|
import {
|
||||||
caretPosition,
|
caretPosition,
|
||||||
@ -21,90 +11,9 @@ import {
|
|||||||
} from "discourse/lib/utilities";
|
} from "discourse/lib/utilities";
|
||||||
import { INPUT_DELAY, isTesting } from "discourse-common/config/environment";
|
import { INPUT_DELAY, isTesting } from "discourse-common/config/environment";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import discourseDebounce from "discourse-common/lib/debounce";
|
||||||
import deprecated from "discourse-common/lib/deprecated";
|
|
||||||
import discourseLater from "discourse-common/lib/later";
|
import discourseLater from "discourse-common/lib/later";
|
||||||
import { findRawTemplate } from "discourse-common/lib/raw-templates";
|
import { findRawTemplate } from "discourse-common/lib/raw-templates";
|
||||||
|
|
||||||
// TODO (martin) Remove this once plugins have changed to use hashtag-decorator and
|
|
||||||
// hashtag-type-registry imports
|
|
||||||
export function fetchUnseenHashtagsInContext() {
|
|
||||||
deprecated(
|
|
||||||
`fetchUnseenHashtagsInContext is has been moved to the module 'discourse/lib/hashtag-decorator'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.fetchUnseenHashtagsInContext",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return fetchUnseenHashtagsInContextNew(...arguments);
|
|
||||||
}
|
|
||||||
export function linkSeenHashtagsInContext() {
|
|
||||||
deprecated(
|
|
||||||
`linkSeenHashtagsInContext is has been moved to the module 'discourse/lib/hashtag-decorator'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.linkSeenHashtagsInContext",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return linkSeenHashtagsInContextNew(...arguments);
|
|
||||||
}
|
|
||||||
export function generatePlaceholderHashtagHTML() {
|
|
||||||
deprecated(
|
|
||||||
`generatePlaceholderHashtagHTML is has been moved to the module 'discourse/lib/hashtag-decorator'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.generatePlaceholderHashtagHTML",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return generatePlaceholderHashtagHTMLNew(...arguments);
|
|
||||||
}
|
|
||||||
export function decorateHashtags() {
|
|
||||||
deprecated(
|
|
||||||
`decorateHashtags is has been moved to the module 'discourse/lib/hashtag-decorator'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.decorateHashtags",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return decorateHashtagsNew(...arguments);
|
|
||||||
}
|
|
||||||
export function getHashtagTypeClasses() {
|
|
||||||
deprecated(
|
|
||||||
`getHashtagTypeClasses is has been moved to the module 'discourse/lib/hashtag-type-registry'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.getHashtagTypeClasses",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return getHashtagTypeClassesNew(...arguments);
|
|
||||||
}
|
|
||||||
export function registerHashtagType() {
|
|
||||||
deprecated(
|
|
||||||
`registerHashtagType is has been moved to the module 'discourse/lib/hashtag-type-registry'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.registerHashtagType",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return registerHashtagTypeNew(...arguments);
|
|
||||||
}
|
|
||||||
export function cleanUpHashtagTypeClasses() {
|
|
||||||
deprecated(
|
|
||||||
`cleanUpHashtagTypeClasses is has been moved to the module 'discourse/lib/hashtag-type-registry'`,
|
|
||||||
{
|
|
||||||
id: "discourse.hashtag.cleanUpHashtagTypeClasses",
|
|
||||||
since: "3.2.0.beta5-dev",
|
|
||||||
dropFrom: "3.2.1",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return cleanUpHashtagTypeClassesNew(...arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up a textarea using the jQuery autocomplete plugin, specifically
|
* Sets up a textarea using the jQuery autocomplete plugin, specifically
|
||||||
* to match on the hashtag (#) character for autocompletion of categories,
|
* to match on the hashtag (#) character for autocompletion of categories,
|
||||||
|
@ -32,12 +32,6 @@ module PageObjects
|
|||||||
find(bulk_select_dropdown_item(name)).click
|
find(bulk_select_dropdown_item(name)).click
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO (martin) Remove all this once discourse-assign is using the new bulk select
|
|
||||||
# modal page object in specs.
|
|
||||||
def has_close_topics_button?
|
|
||||||
page.has_css?(bulk_select_dropdown_item("close-topics"))
|
|
||||||
end
|
|
||||||
|
|
||||||
def click_close_topics_button
|
def click_close_topics_button
|
||||||
find(bulk_select_dropdown_item("close-topics")).click
|
find(bulk_select_dropdown_item("close-topics")).click
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user