You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @skanda-vasishta. A new issue for you concerning icons in the table of contents and in mobile view.
Currently, in the table of contents, such as below, the entries are displayed alphabetically. The same holds true in mobile view.
We want to add the feature of allowing users to have icons show up in a different order in the table of contents, other than alphabetically. In the modal content type, there is a new custom content field called modal_icon_order, which only accepts integers between 1 and 20 and with a default value of 1. What we want is to sort items by the icon order. When there are ties in the icon order, then let's go back to alphabetical sorting. This new ordering should also be used for the icons in mobile view. modal_icon_order should be available via the REST API.
As a second thing, it would be good to add section headers to the mobile view, when - for a given scene - the table of contents style is either "sectioned list" or "accordion". Something like below, but I'm sure that you can style it better. If the table of contents style is "list", then we wouldn't have section headers, obviously. If section headers are there, let's be sure to keep ordering by the field modal_icon_order.
The text was updated successfully, but these errors were encountered:
added for desktop/tablet: const sorted_child_objs = Object.values(child_obj).sort((a, b) => a.modal_icon_order - b.modal_icon_order);
iterate through this in table_of_contents and list_toc functions instead of child_obj
mobile view requires more complicated changes as sections must be accounted for; first, sort by provided order if icon exists, maintain list of icons that don't exist separately. separate by section for existing icons, include extra section for existing icons without provided section. then, add another "pseudo" section including all icons that don't yet exist in wp (only include this section if there are any such icons)
Hey @skanda-vasishta. A new issue for you concerning icons in the table of contents and in mobile view.
Currently, in the table of contents, such as below, the entries are displayed alphabetically. The same holds true in mobile view.
We want to add the feature of allowing users to have icons show up in a different order in the table of contents, other than alphabetically. In the modal content type, there is a new custom content field called
modal_icon_order
, which only accepts integers between 1 and 20 and with a default value of 1. What we want is to sort items by the icon order. When there are ties in the icon order, then let's go back to alphabetical sorting. This new ordering should also be used for the icons in mobile view.modal_icon_order
should be available via the REST API.As a second thing, it would be good to add section headers to the mobile view, when - for a given scene - the table of contents style is either "sectioned list" or "accordion". Something like below, but I'm sure that you can style it better. If the table of contents style is "list", then we wouldn't have section headers, obviously. If section headers are there, let's be sure to keep ordering by the field
modal_icon_order
.The text was updated successfully, but these errors were encountered: