Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix/issues 1666#1667

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
bassmanitram wants to merge6 commits intojson-editor:master
base:master
Choose a base branch
Loading
frombassmanitram:fix/issues-1666

Conversation

bassmanitram
Copy link

@bassmanitrambassmanitram commentedMay 15, 2025
edited
Loading

  • utilities.js
    • AddedcheckBooleanOption in order to not repeat the pain of checking if options are set and, if so what are they set to!
    • AddedgetValueByPath to get a value from a model by its string path (there may be a better way to do this)
  • array.js:
    • Evaluate all options using the new utility in order to fix the original issue ofpreBuild options are not properly evaluated for array editors #1666
    • Added optionarray_copy_in_place to allow for both the originalarray.js behaviour and thetable.js behavior
    • Addedon_copy_item_label_path option which, if set, allows the editor to modify the label of the copied item by appending Copy to it.
    • Cleaned up some code related to finding referenced values in the current array (OK, I'm not sure why the code looped through the value rather than just directly indexing it - maybe there is a subtle reason)
    • Made some code more flexible so that it could be better inherited
  • table.js
  • multiple.js
    • Added two options -type_path andtype_values so that the schema can tell the editor where to look for a value that indicates the "type" of an instance, and what editor it applies to - thus skipping the trial-and-error associated with schema determination.type_path is the path within the value where the type indicator can be found,type_values is an array of possible values of that indicator, in the order of declaration in the schema (which translates into the order of sub-editor instances for the multiple editor).
QA
Is bugfix?✔️
New feature?✔️
Is backward-compatible?✔️
Tests pass?✔️ (OK, same failures as master)
Fixed issues#1666
Updated README/docs?✔️❌
Added CHANGELOG entry?✔️❌

Martin Bartlett added6 commitsMay 13, 2025 11:50
Main enhancements:* Cleanup and alignment of Table and Array editor code* New option `array_copy_in_place` determines whether a copied element is  placed after the element it is copied from, or placed at the end of the array.  For `array` the default value is `false` corresponding to the existing behaviour.  For `table` the default value is `true` corresponding to the existing behaviour.
Rather than the potentially expensive validation of a valueagainst multiple schemata, how about we provide the path toa value field that tells you the type and an array of values inthe order of declaration!
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@bassmanitram

[8]ページ先頭

©2009-2025 Movatter.jp