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:
Martin Brennan 2024-05-27 14:00:36 +10:00 committed by GitHub
parent cb592ae4ac
commit 3a91a92563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 98 deletions

View File

@ -2,17 +2,7 @@ import { cancel } from "@ember/runloop";
import { htmlSafe } from "@ember/template";
import { ajax } from "discourse/lib/ajax";
import { CANCELLED_STATUS } from "discourse/lib/autocomplete";
import {
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 { getHashtagTypeClasses as getHashtagTypeClassesNew } from "discourse/lib/hashtag-type-registry";
import { emojiUnescape } from "discourse/lib/text";
import {
caretPosition,
@ -21,90 +11,9 @@ import {
} from "discourse/lib/utilities";
import { INPUT_DELAY, isTesting } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import deprecated from "discourse-common/lib/deprecated";
import discourseLater from "discourse-common/lib/later";
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
* to match on the hashtag (#) character for autocompletion of categories,

View File

@ -32,12 +32,6 @@ module PageObjects
find(bulk_select_dropdown_item(name)).click
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
find(bulk_select_dropdown_item("close-topics")).click
end