wayBetter for X
This commit is contained in:
commit
2f1e35ba20
720 changed files with 147465 additions and 0 deletions
29
apps/desktop/src/areas/compose/features.ts
Normal file
29
apps/desktop/src/areas/compose/features.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Compose+: its rows of the feature table (docs/AREA-PLUGINS.md). `FEATURES` is what its card lists;
|
||||
// `POWER` are the flags Power User turns on besides the defaults. A flag id never changes once it
|
||||
// shipped. New words go to ./messages.en.json; modules to ./index.ts.
|
||||
|
||||
import type { FeatureSpec } from '../../../../../waybetter/packages/runtime/src/featureTable.ts';
|
||||
import { app, modules, plugin, ported } from '../rows.ts';
|
||||
|
||||
/** Every page a composer can be on: the inline ones of timelines and post pages, and X's composer page. */
|
||||
const COMPOSER_PAGES = ['timeline', 'composer'] as const;
|
||||
/** The row words of a feature that is new with Compose+ (./messages.en.json). */
|
||||
const words = (name: string) => ({ label: `plugin.compose-plus.feature.${name}.label`, description: `plugin.compose-plus.feature.${name}.description` });
|
||||
|
||||
export const FEATURES: readonly FeatureSpec[] = [
|
||||
// Asks native code for the drafts popover (`drafts_picker_open`): a part of the X runtime.
|
||||
...app('compose', '', [{ id: 'composerDrafts', default: true }]),
|
||||
// Ported last (it is being redesigned): until then it runs from its plugin file.
|
||||
plugin('compose', '', 'compose.emojiPicker', 'emoji-picker', ['storage', 'ui']),
|
||||
...modules('compose', '', [
|
||||
ported('compose.altTextReminder', 'alt-text-reminder', { surfaces: COMPOSER_PAGES, keywords: 'Alt-text Reminder image description accessibility', permissions: ['ui'] }),
|
||||
ported('compose.replyGuard', 'reply-guard', { settings: true, keywords: 'Reply Guard old post stranger', permissions: ['storage', 'ui', 'account', 'users', 'commands'] }),
|
||||
// New with Compose+. Off until turned on (or Power User): each adds something to X's composer.
|
||||
{ id: 'compose.postingAs', surfaces: COMPOSER_PAGES, ...words('postingAs'), keywords: 'account handle multi-account wrong account', permissions: ['account'] },
|
||||
{ id: 'compose.lengthMeter', surfaces: COMPOSER_PAGES, settings: true, ...words('lengthMeter'), keywords: 'character count limit 280 thread', permissions: ['storage'] },
|
||||
{ id: 'compose.snippets', surfaces: COMPOSER_PAGES, settings: true, ...words('snippets'), keywords: 'saved text template signature shortcut', permissions: ['storage', 'ui', 'commands'] },
|
||||
]),
|
||||
];
|
||||
|
||||
/** Flags Power User turns on besides the defaults (this area's advanced features). Reply Guard holds a click back: never by a preset. */
|
||||
export const POWER: readonly string[] = ['compose.altTextReminder', 'compose.postingAs', 'compose.lengthMeter', 'compose.snippets'];
|
||||
Loading…
Add table
Add a link
Reference in a new issue