Skip to content
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

Add support for publishedMedia #332

Open
wants to merge 24 commits into
base: beta
Choose a base branch
from
Open

Add support for publishedMedia #332

wants to merge 24 commits into from

Conversation

Spacerat
Copy link
Contributor

@Spacerat Spacerat commented Aug 19, 2016

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).
screen shot 2016-08-18 at 18 46 45
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.

screen shot 2016-08-18 at 18 40 48

Only the first item has the help text - the rest look like this:
screen shot 2016-08-18 at 19 36 12

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
screen shot 2016-08-18 at 18 39 47
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.
screen shot 2016-08-18 at 18 46 55

@pebble-heroku pebble-heroku temporarily deployed to cloudpebble-sp-pr-332 August 19, 2016 02:59 Inactive
@Spacerat Spacerat temporarily deployed to cloudpebble-sp-pr-332 August 30, 2016 16:54 Inactive
Katharine and others added 5 commits August 30, 2016 10:38
* Only replace `{{pkjs_entry_point}}` when `app_modern_multi_js`.

* re-chain replaces

* Don't give json to workers.
Allow running 4.0 apps on applite 3.12.2+
@Spacerat Spacerat temporarily deployed to cloudpebble-sp-pr-332 August 30, 2016 21:24 Inactive
Joseph Atkins-Turkish and others added 3 commits August 30, 2016 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants