Closed clapierre closed 3 years ago
The current logic explicitly renders the default
group first because it has no heading -- how are you expecting the visual distinction to look when you go from the last file in Group Color Labels
to the first file in default
, for instance? Right now that would visually be only background color since default groups have no heading or expand/collapse functionality.
Maybe in addition to just the background color difference there could be a boarder around the entire grouping to help make it a little more distinct.
I am fine with the default always being first, but the ordering of the rest really should match what the order is on the back end and ideally not allow you to move the default from the first position, but I am less worried about that, its just confusing when you go in and move the groups around on the Wordpress Resource "groups" panel and it doesn't change the order of the groups in the UI.
Ordering and border color addressed in dff2c303c023845c8a65b2df90cd2403a77bc861 and 5c2278a3e787ec1965306657d056f4b1c6a99205
Can we increase the separation between file groups Hard to see where one ends and the other beings with the minimal spacing
Quick a11y note. Please put alt text on the images :). Thanks much
@clapierre sure thing, sorted in a5dab96.
@sinabahram which images specifically? I don't always have alt text available, not for resource files, where I render an empty alt. When a description exists (for the main resource image) it's rendered as the image alt. Did I overlook something?
Ah sorry - was this to @clapierre? I misunderstood.
Ya not sure @sinabahram What alt texts are needed. We didn't change anything as far as the images were concerned.
I think @sinabahram meant the screenshot you posted in this thread.
All images in these groupS are really described by the surrounding text so should be marked decorative I believe
That's not possible as they are links, so must have appropriate alt text.
And, yes, I'm talking about screenshots in the thread. Sorry for confusion there.
@clapierre please close the issue if you're happy with the modifications I made to the styling 👍
Lets try 1.5em. Added the alt text Sina above, missed that.
It's at 1.5em now 👍
The 1.5em looks great, however seems we have lost the ability to order the associated resource file groups which the original comment of this ticket was requesting. I believe that was fixed but somewhere along the way we lost that associated panel in the Resource File of associated file groups which we could order.
If default always appears first then I would be fine to omit that from the sortable list an all additional resource groups could be ordered.
Currently in the Frog Dissection there are 3 groups + default which would be great to order so that all the Braille groups are together etc. This would be customized by the admin like we previously had.
Frog Dissection Color Labels Frog Dissection Braille No Labels Frog Dissection Braille Labels
This is difficult since the relationship has been inverted; file groups have a parent resources relationship instead of parent resources having file group relationships.
If this is to be done without a bunch of custom work, may I suggest the following:
1) the "file group" edit page gets an integer field: order
2) this is not a required field (if it's not set, order of 1
is assumed)
3) a default group has implicit order of 0
4) sorting goes by increasing value of this property
Would that work for you @clapierre?
Yes this could work, but what would happen if we have 5 resource file groups for a resource default 0 group A 1 group B 2 group D 3 group E 4 group C 5
Then I realized that the last group I just made Group C should be at level 3, can I just change the position 5 to a 3 and groups D and E will get the new values of 4 & 5 automatically?
If thats the case yes that will work.
can I just change the position 5 to a 3 and groups D and E will get the new values of 4 & 5 automatically?
It adds a bit of logic, but I can work on that. Thanks for the clarification.
@clapierre I've done some work on this. File groups now have a "Display order" field that is also reflected in the admin overview. Basically:
1) you can give any number starting at 1. [1, 10, 20, 25, 234234], etc.
2) when you save the group, any groups for the parent resource become reordered. So the example sequence above would become [0 (default), 2, 3, 4, 5, 6].
3) when you change the order of a group, the groups around it become re-ordered.
4) when you create a new group for that resource, and say, give it order 3
, the existing order 3
becomes 4
and so on.
Can you play around with this and tell me what you think?
Yes this seems to be working however its weird that the default groups says 1 not 0? Also the instructions say The display order of this group in the list of groups. From low-to-high. [0, 1, 2], 0 = first, 2 = last.
But if I put 0 and try to save it says the value is invalid it must be 1 or greater.
That's a good catch! The value for default groups is effectively ignored. I'll add a condition that hides that input field when the group is a default group. And I'll update the description.
Addressed via d54d62abfddf8f87c380a052a1a66b1c4a53bbcd
Looks good.
In the Resources - File Groups section (right panel, of associated file groups) We can order the file groups including the default file group however the UI always shows the order as the order they were created.
The UI ordering of the groups should match the order in the Resource File Group
I am also fine if the admin moves the default group in the middle of two groups, let me know if that causes any issues, but I would think you would just go down the list populating the UI as you go
Group Color Labels default Group Braille Labels
or
default Group Color Labels Group Braille Labels
or
Group Braille Labels Group Color Labels default
Whatever the Resource File group order is will be the order on the UI.