-
Notifications
You must be signed in to change notification settings - Fork 56
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
Field ordering #165
Comments
I think, initially, a feature to automatically order fields alphanumerically would be useful (enough for me). I make use of (key) naming such that things naturally group when ordered. A select, similar to the entry pane component[c], would suffice for this with some options:
NB Being able to set ordering (e.g. groups, entries, fields) globally would be useful too In addition, manual field ordering could come later, once the interaction patterns exist, using some down/up (arrow) buttons, drag/drop (and don't forget keyboard shortcuts!) If you have any issues (e.g. questions/queries) then happy to help Hope this helps Regards |
The trouble with this issue is that fields are stored on Entries as In my opinion we could start with simply numerical orders which would allow for drag+drop reordering. @ldexterldesign your design would still be applicable as an extension to this behaviour as it could forcibly update the numerical orders in the background. |
Seems legit[l] If you can help[h] then happy to attempt a PR Cheers h: @ldexterldesign:matrix.org (preference) or https://keybase.io/ldexterldesign |
Ok, so I'd go about this process in the following manner, if I were tackling it:
|
So, as an example, let's say we have the following setup:
After calling
Notice the orders of "Test Note", "URL" and "E-Mail". After calling
Note that setting any order above the last possible order value will result in it being normalised to the last possible value. |
Also good to note that the |
Slloooowwwlllyy working on this... I see jsdoc style comments - are there generated docs hidden somewhere? Cheers |
@ldexterldesign Yes API.md in the root is generated from JSDoc comments.. |
During the implementation of this would it allow for duplicate custom fields for entries? Right now the behavior is such that only the last duplicate field is saved. |
Hi @haloway13, Do you have a use case for this? I'm currently doing this for single sign-ons but TBH I would rather not have to bother with (managing) the numeric suffixes, so I'm inclined to agree with you: Sincerely |
I just had the case happen when I was mistakenly adding a field name I already had that it deleted the field value I wanted to keep and not replace. I would be happy to expound if that does not make sense. |
Hi @haloway13,
Yes, it's happened to the best of us 🙃 Sincerely |
Support ordering of fields (meta).
Ordering information should be stored in an attribute. The attribute key could be as such:
metaOrder:someAttributeName
. The order should be numeric, 0 and upwards. If a meta item does not have an order attribute, it should be placed at the end of the list in random order (as it falls).Helpers to get the order should be provided. A helper to reset the order of each item should be provided. Some kind of interface to manage changing the order should be provided. Discuss any ideas here before implementation.
The text was updated successfully, but these errors were encountered: