This PR adds support to CloudPebble for publishedMedia.
The basic interface looks like this. It is only available for Native SDK 4 projects (and not packages).
It has the following behaviours:
Toggling "Specify Timeline Icons" shows or hides the 'tiny/small/large' menus.
Glance has an extra option called "-- None --" which removes it from
Selecting a resource ID for "Glance" while timeline is enabled will change tiny with it
Each Select element presents a set of resource IDs (image or raw) which combines
Your own own project's resources
Any resource IDs in dependencies (updated whenever dependencies are changed)
The form auto-saves whenever it is in a valid state, and it doesn't disrupt the user with errors while editing. If the user isn't sure why the form isn't saving, they will probably try submitting the form by pressing enter or clicking the save button, at which point they will actually be shown an error message which disappears as soon as the user resolves the error.
Only the first item has the help text - the rest look like this:
The "Add New Published Media" button adds a new section, with a numeric ID of max(ids)+1.
When you rename your own project's resource IDs, CloudPebble attempts to figure out what was renamed to what, and then rename the corresponding publishedMedia entry. In 99% of cases (i.e. a resource ID which was unique was renamed to something else) this will be successful.
However, there are a number of possible actions which can result in publishedMedia referencing ResourceIDs which no longer exist, and when this happens an icon will appear next to the sidebar menu
These actions include:
A publishedMedia references duplicated ResourceIDs, and both ResourceIDs are simultaneously renamed to different things.
A publishedMedia references a ResourceID which is deleted.
A publishedMedia references a ResourceID from a dependency which no longer exists or no longer has the resource.
A publishedMedia references a ResourceID which doesn't exist because it was imported from github or a ZIP file.
Finally: because it is not possible for CloudPebble to know whether the publishedMedia are valid until it gets the list of resources from dependencies (which happens via the YCM proxy), the pane will not show until YCM has finished (or failed) initialising. If the user navigates to the pane before that, a simple loading message is shown.
This PR adds support to CloudPebble for publishedMedia.
The basic interface looks like this. It is only available for Native SDK 4 projects (and not packages). It has the following behaviours:
The form auto-saves whenever it is in a valid state, and it doesn't disrupt the user with errors while editing. If the user isn't sure why the form isn't saving, they will probably try submitting the form by pressing enter or clicking the save button, at which point they will actually be shown an error message which disappears as soon as the user resolves the error.
Only the first item has the help text - the rest look like this:
The "Add New Published Media" button adds a new section, with a numeric ID of max(ids)+1.
When you rename your own project's resource IDs, CloudPebble attempts to figure out what was renamed to what, and then rename the corresponding publishedMedia entry. In 99% of cases (i.e. a resource ID which was unique was renamed to something else) this will be successful.
However, there are a number of possible actions which can result in publishedMedia referencing ResourceIDs which no longer exist, and when this happens an icon will appear next to the sidebar menu These actions include:
Finally: because it is not possible for CloudPebble to know whether the publishedMedia are valid until it gets the list of resources from dependencies (which happens via the YCM proxy), the pane will not show until YCM has finished (or failed) initialising. If the user navigates to the pane before that, a simple loading message is shown.