-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feat (remote assets): handle asset pack containing asset overrides #2408
base: master
Are you sure you want to change the base?
Conversation
@@ -133,6 +133,14 @@ export interface IDeploymentConfig { | |||
_parent_config?: Partial<IDeploymentConfig & { _workspace_path: string }>; | |||
} | |||
|
|||
/** Duplicate type defintion from data-models (TODO - find better way to share) */ | |||
interface IFlowTypeBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from lower down to group with other relevant definitions
@@ -18,7 +18,7 @@ | |||
.popup-container { | |||
height: var(--safe-area-height); | |||
} | |||
.close-button { | |||
.close-button { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this is cropping up now, but reverting it and committing isn't possible as the linter removes the whitespace again when I attempt a commit (so the would-be commit is empty)
@jfmcquade It looks to me like the |
That's strange, the debug config on the main branch should already be configured correctly. I get the same error on the live web preview, but not locally. I suspect this is something to do with the way that the encrypted supabase config is supposed to be decrypted and incorporated into the deployment config. @chrismclarke can you think of why this might not be working when the deployment is set as part of the github action? Looking at the logs for the deployment preview action triggered by this PR (see "Set deployment" section of "build"), I can see that initially there are logs complaining that the encrypted configs do not exist, but this is before the deployment has been set. Then when the deployment is set, the encrypted configs do appear to be decrypted successfully, so I may be misdiagnosing the issue. |
I think we probably should. We can specify a target supabase project via the deployment config, so in theory it would be a good idea to keep separate projects for different deployments, or at least groups of deployments like PLH. However, as supabase only allows an organisation to have two free projects at once, it may well make sense to, at least initially, start with a single "open app builder" project that we can use to store everything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. I really like the debug template you've setup, does a very good job of illustrating core functionality, although I appreciate it's a bit tricky to manage differences between web and native.
I've added one minor tidying PR, just to move the asset type definitions to their own file
5fdf023, and have confirmed that the tests and debug sheet are working locally.
I'm not sure quite what's next for this feature, although I would recommend when next working on the code that it might be worth trying to split out the remote-asset.service
code a bit as the file is getting quite long and hard to keep track of what is and isn't being tested. It might be worth separating the actions to a remote-asset.actions.ts
with corresponding remote-asset.actions.spec.ts
and possibly there might be some use having a remote-asset.utils.ts
to handle methods that are purely data manipulation (no outside service interaction).
I'd also recommend splitting out the code that initialises supabase into a supabse.service.ts
Somewhat unrelated, I can see the RemoteAssetService
is initialised in the main app as a blocking service. Given that most of the interaction will be from user-generated actions I'd say likely this can be deferred to after main init.
Oh, and I noticed the inline comment about queueing parallel downloads - agreed this would be nice to have although before getting to that point it might be worth considering some sort of UI/popup to display that shows the overall progress of the remote asset download, as I can't really think of a tidy way to include as a variable within templates at this point in time (could be configured later)
Ah, yeah I see the issue. I get the same problem locally when importing the debug repo for the first time. In order to decrypt the repo the repo first needs to be set (hence on first load it says encrypted not found), but then after being set and decrypted there's no update to the Hopefully fixed with #2462 |
PR Checklist
Description
Remote assets: Adds functionality to handle case of an asset pack containing asset overrides (previously only top-level/"default" assets were supported).
See below for demo.
TODO/Next steps
FlowTypes.AssetPack
format, and uploading everything to supabaseGit Issues
Closes #
Screenshots/Videos
The template debug_remote_assets captures various use cases. Essentially, there are the following asset files included in either the "core" assets (standard assets included in the app bundle) or the "debug_asset_pack_1" asset pack (uploaded to supabase):
debug_asset_pack_1
Google Drive folder structure:
Supabase storage folder structure:
debug_remote_assets:
Web demo:
web.mov
Android demo:
Android.mov