-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor code for EditTemplate fields #9582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for tiddlywiki-previews ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Confirmed: yaisog has already signed the Contributor License Agreement (see contributing.md) |
📊 Build Size Comparison:
|
| Branch | Size |
|---|---|
| Base (master) | 2449.9 KB |
| PR | 2449.9 KB |
Diff: ⬆️ Increase: +0.0 KB
✅ Change Note Status
All change notes are properly formatted and validated!
📝 $:/changenotes/5.4.0/#9582
Type: enhancement | Category: internal
Release: 5.4.0
Refactor code for EditTemplate fields
🔗 #9582
👥 Contributors: yaisog
📖 Change Note Guidelines
Change notes help track and communicate changes effectively. See the full documentation for details.
|
We should ensure that the bug reported in #9574 is not related to any chnages in the edit template before we refactor it. |
|
Hi @saqimtiaz, the field editor only captures the |
I suspect the same and I think I recall a refactoring of the |
|
@yaisog in light of your work on this PR, could you please reflect on whether the $fieldmangler widget is still needed or whether it could potentially be deprecated in favour of $action-listops? I am not suggesting that we consider that as part of this PR, but in light of the recfactoring work you have done your insight would be appreciated. |
|
Hi @saqimtiaz, the <$fieldmangler> was only used with the |
Hi @saqimtiaz, I had a look. It is both. |
|
I added the parameter The partly resolves #9574. |
|
Excellent, thank you @yaisog |
Initially, this should have been an optimization to improve the readability check of the filters that determine the visibility of the individual fields, see #9526.
However, there was a bunch of pre-5.3.0 code in there that was also partially duplicated and it was not really formatted in a readable way. So this turned into a major refactor.
No functionality should have changed, except that the new field name button now also gets focused when pressing the "Add" or "Delete" buttons, not just when using the respective keyboard shortcuts. Oh, and the focusing was somewhat broken anyway, because the CSS selector that was constructed was not usually valid (it CSSescaped the tiddler title, which the class assignment in the ViewTemplate did not).
I did some testing without problems, but since this is a tiddler that is central to the EditTemplate, I recommend more testing by other parties.