From bf8c866a74ce506e86f5609257940135746a52d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 17 Feb 2026 10:09:44 +0100 Subject: [PATCH] add small text --- client/components/combobox.jsx | 2 +- .../editor/metadataEditor/metadataEditor.jsx | 11 +- .../tagInput/curatedTagSuggestionList.js | 128 +----------------- client/homebrew/editor/tagInput/tagInput.jsx | 8 +- 4 files changed, 15 insertions(+), 134 deletions(-) diff --git a/client/components/combobox.jsx b/client/components/combobox.jsx index b80bccd1c..16122eafd 100644 --- a/client/components/combobox.jsx +++ b/client/components/combobox.jsx @@ -16,7 +16,7 @@ const Combobox = createReactClass({ suggestMethod : 'includes', filterOn : [] // should allow as array to filter on multiple attributes, or even custom filter }, - valuePatterns: [/.+/] + valuePatterns: /.+/ }; }, getInitialState : function() { diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index 1d78eef60..2a0df4e76 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -339,9 +339,12 @@ const MetadataEditor = createReactClass({ {this.renderThumbnail()} - this.handleFieldChange('tags', e)} /> @@ -355,11 +358,13 @@ const MetadataEditor = createReactClass({ {this.renderAuthors()} - !this.props.metadata.authors?.includes(v)]} placeholder='invite author' unique={true} values={this.props.metadata.invitedAuthors} - notes={['Invited author usernames are case sensitive.', 'After adding an invited author, send them the edit link. There, they can choose to accept or decline the invitation.']} + smallText='Invited author usernames are case sensitive. After adding an invited author, send them the edit link. There, they can choose to accept or decline the invitation.' onChange={(e)=>this.handleFieldChange('invitedAuthors', e)} /> diff --git a/client/homebrew/editor/tagInput/curatedTagSuggestionList.js b/client/homebrew/editor/tagInput/curatedTagSuggestionList.js index 5df33db00..c20dec445 100644 --- a/client/homebrew/editor/tagInput/curatedTagSuggestionList.js +++ b/client/homebrew/editor/tagInput/curatedTagSuggestionList.js @@ -169,108 +169,28 @@ export default [ "meta:v3", "meta:Legacy", -]; -const ReadList = [ - // Systems / Editions - "5e", - "5th Edition", - "5.5e", - "5e'24", - "5.24", - "5e 2024", - "D&D 5e", - "DnD 5e", - "DnD5e", - "D&D 5e24", - "DnD5e24", - "D&D 2024", - "system:pf2e", - "system:dnd5.5", - "system:dnd5e", - "system:dnd", - "system:5e", - "system:d&d5e", - "system:D&D 5e24", - "system:book clone", - "system:curse of strahd", - "system:descent into avernus", - "system:GM Binder", - "system:Ord", - "system:sf2e", - "system:Mutants and Masterminds", - "system:2e", - "system:class", - "PF2e", - "pf2e", - "3.5e", - "3.5", - "system:pf2e", - "DnD", - "DND", - "dnd", - "dnd-2014", - "dnd-2024", - "dnd5e", - "DnD 5e", - "DnD5e24", - "DnDBeyond", - "DnDBehindTheScreen", - "Dd5", - "DD5", - "dd5", - "dd5e", - "system:D&D", - "system:D&D 5e24", - "system:d&d5e", - "system:5e", - "system:daggerheart", - "system:dnd5e", - "system:dnd5.5", - "system:dnd", - "system:GM Binder", - "system:Ord", - "system:sf2e", - "system:curse of strahd", - "system:descent into avernus", - "system:class", - "system:Mutants and Masterminds", - "system:2e", - - // Media / Pop Culture + // ############################# Media / Pop Culture "One Piece", - "One Piece DND", - "Luffy", "Dragon Ball", "Dragon Ball Z", - "Dragon Ball Z TTRPG", - "Dragon Ball Z RPG", - "Dragon Ball Z DND", - "Dragon Ball Z 5e", "Naruto", - "Naruto 5e", "Jujutsu Kaisen", "Fairy Tail", "Final Fantasy", - "Final Fantasy XIV", - "Final Fantasy 7 Remake", - "FF7", - "FFXI", "Kingdom Hearts", "Elder Scrolls", - "Elder Scrolls Offline", "Skyrim", "WoW", "World of Warcraft", "Marvel Comics", "DC Comics", - "Pokémon", "Pokemon", "League of Legends", "Runeterra", + "Arcane", "Yu-Gi-Oh", "Minecraft", - "Minecraft Mods", "Don't Starve", "Witcher", "Witcher 3", @@ -293,49 +213,5 @@ const ReadList = [ "Critical Role", "Star Wars", "SW5e", - "SW5E", "Star Wars 5e", - - // Tools / Resources / Templates / Notes - "Template", - "Templates", - "Style Template", - "meta:Template", - "meta:Theme", - "meta:5e24 Style", - "meta:khaoz age", - "meta:gratis", - "meta:free", - "meta:Sheet", - "meta:documentation", - "meta:npc", - "meta:User Guide", - "fa-solid fa-sheet-plastic:Ficha", - "tag:Class", - "tag:Rules", - "tag:Spells", - "tag:Adventure", - "tag:Spell List", - "tag:TAoF&F", - "tag:Berean", - "resource", - "Resources", - "support", - "user help", - "notes", - "note", - "quick ref", - "reminder cards", - "syntax", - "css", - "custom css", - "example", - "examples", - "snippet", - "snippets", - "tables", - "chart", - "stat block", - "stat blocks", - "statblock", ]; diff --git a/client/homebrew/editor/tagInput/tagInput.jsx b/client/homebrew/editor/tagInput/tagInput.jsx index 5b803a8c9..f272a605c 100644 --- a/client/homebrew/editor/tagInput/tagInput.jsx +++ b/client/homebrew/editor/tagInput/tagInput.jsx @@ -4,7 +4,7 @@ import Combobox from "../../../components/combobox.jsx"; import tagSuggestionList from "./curatedTagSuggestionList.js"; -const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholder = "", onChange }) => { +const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholder = "", smallText = "", onChange }) => { const [tagList, setTagList] = useState( values.map((value) => ({ value, @@ -12,7 +12,6 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde editing: false, })), ); - //console.log(label, values, placeholder); useEffect(() => { const incoming = values || []; @@ -179,7 +178,7 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde className="tagInput-dropdown" default="" placeholder={placeholder} - options={label === "tags" ? suggestionOptions : []} // always array + options={label === "tags" ? suggestionOptions : []} autoSuggest={ label === "tags" ? { @@ -187,7 +186,7 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde clearAutoSuggestOnClick: true, filterOn: ["value", "title"], } - : { suggestMethod: "includes", clearAutoSuggestOnClick: true, filterOn: [] } // empty filter + : { suggestMethod: "includes", clearAutoSuggestOnClick: true, filterOn: [] } } valuePatterns={valuePatterns.source} onSelect={(value) => submitTag(value)} @@ -199,6 +198,7 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde } }} /> + {smallText.length !== 0 && {smallText}} );