Slightly easier text entry
I've finished the first pass at a feature that will make entering text slightly easier (in blog posts, comments, artist bio, etc). As you know, typing / in one of these boxes will allow you to search for an artist and automatically insert the correct ID/name.
Going forward, rather than showing that text string with the ID number and slashes, it will just show a nice little link to the artist. You'll still be able to switch to a “plain” editor if you'd like to see the plain text, but for most people I think this will be preferred.
I've also extended the shortcut system, so in addition to using / for artists and = for labels, you can use @ for usernames. I'm also planning to turn on something similar for livehouses 🙏
All of that being said, the feature isn't turned on yet for most people. It ended up being way more complicated than I anticipated, so I want to spend some time making sure that it doesn't screw up any data on the site. After I've spent some time with it, I'll open the feature to all VIP members for additional testing; after that it will go public.
All updates
- minor addition Added user search to tribute_search().
- minor addition Added style for kbd elements.
- improvement Updated tribute.js to newer version. Need to watch for breaks.
- improvement Updated comment textareas to use autosize.
- new feature Completed provisional version of initTribute. It should now allow for switching between plain and rich editors with plain and rich tokens, navigating around and deleting tokens, preserving line breaks, triggering user tokens with @, and more.
- improvement Updated 'edit artist' page to show only label hint under labels textarea (per new tribute code).
- improvement Added temporary flag to main page that will allow tributable only under my account, and then later under VIP accounts, for testing.
- improvement Updated style of hint box with tributable elements.
- bug fix Fixed inlineSubmit to work with newest version of initTribute.
- new feature Updated initTribute to generate contenteditable clones of tributable elements, so that tribute elements (artists, labels, etc) can show as tokens. Also separated logic, so that placeholder tokens can be generated from plain text.
- new feature Added tribute style. Probably need to standardize.
- improvement Updated inlineSubmit to copy contenteditable clones into original tributable elements. Need to address way line breaks are handled.
- other Need to investigate tokens within tokens on init, tokens failing on init (possibly due to brackets?), and elements with live previews.
- improvement Changed tribute styles: added slight bottom margin so that two tributes don't touch; changed tributing element to display-inline, which prevents Chrome from making divs everywhere; and styled wrapper around tributing element to flex, and tributing element to fill it.
- improvement Updated initTribute.js to put a very small space around tribute tokens, since the cursor disappears around them otherwise (Chrome bug); adds slight annoyance of having to key several times around each element (will have to play around and see if this is ok in long run). Also updated replacement to avoid nested tokens. Also updated a while to avoid a false error from linter.
- improvement Reverted regex in initTribute back to original.
- improvement Updated inlineSubmit to replace very thin spaces which are inserted by initTribute. By the way, need to handle: dynamically generated inputs, and need to change clones when original input is changed.
- bug fix Updated auto blogger to link image to blog entry.
- improvement Removed auto 'label' symbol on links with label URL, since labels are now supported in tribute.js.
- improvement Updated to latest version of tribute.js.
- new feature Several changes to initTribute:
When focusing cloned element, cursor now goes to end as expected.
Changed markdown patterns to ignore [DisplayName] portion.
Updated insertTributeTokens to add a VeryThinSpace before tokens which appear first on a new line, as a bug in tribute.js causes cursor to skip them.
Changed rich token to separately wrap the visual portion and actual text portion, and to have a VeryThinSpace before and after; this prevents issues with cusors.
Removed old initTribute() and combined with cloneTributableElems() (which is renamed to initTribute); previously, detached and reattached tribute.js on every elem, but now just attach on each elem when generated.
If original input is focused upon generation, cloned element is focused.
When cloning, only certain classes are copied over.
Remove rich formatting from pasted text (except insert any necessary tokens into pasted text).
- improvement Updated commentate script to call initTribute appropriately, and fire an event when original input is cleared (on form submit).
- improvement Changed cloned elements back to display: block, as inline-block was causing issues with cursors.
- new feature Updated inlineSubmit to clean tributable values better.
- new feature Updated initTribute to clear cloned element if original is cleared. Also added listener for elements that feature live previews. Moved output cleaning from inlineSubmit to initTribute.
- improvement Moved contenteditable cleaner from inlineSubmit to initTribute.
- improvement Updated artist bio and blog entry elements to auto-preview with contenteditable.
- improvement Removed unnecessary tributable element wrapper.
- bug fix Several FF bug fixes for initTribute: positive lookbehind is avoided, space is added around tokens to enable deletion, and wrapper is removed.
- new feature Second pass at tokens in FF. Better, but still working on it.
- new feature Finished(?) fix for FF navigation of contenteditable areas with tokens. Extended that to Chrome. Also started playing with keyboard shortcut labels below textarea, and switch button below textarea.
- minor addition Added user search to tribute_search().
- minor addition Added style for kbd elements.
- improvement Updated tribute.js to newer version. Need to watch for breaks.
- improvement Updated comment textareas to use autosize.
- new feature Completed provisional version of initTribute. It should now allow for switching between plain and rich editors with plain and rich tokens, navigating around and deleting tokens, preserving line breaks, triggering user tokens with @, and more.
- improvement Updated 'edit artist' page to show only label hint under labels textarea (per new tribute code).
- improvement Added temporary flag to main page that will allow tributable only under my account, and then later under VIP accounts, for testing.
- improvement Updated style of hint box with tributable elements.
- bug fix Fixed inlineSubmit to work with newest version of initTribute.
Want to support future updates?
vkgy runs on a custom platform developed by a very small team. If you appreciate what we do and want to help us grow, please consider becoming a VIP member!
Support vkgy