Open
Conversation
* Added manifest.json, thus making the app installable
* Added a couple of screenshots used by app installers
* Added support for opening zip files with the tapestry app
* Caching all assets needed by the application
* Extended the caching strategy so that GET requests to the backend and thumbnails are also cached. Contrary to the other chached resources these are used in a network first manner (instead of cache first)
* Storing the current user and access token in the local storage so we can use it if we are offline
* Created a vite plugin to ensure that all built web assets are included by the service worker and also there are no assets referenced by the service worker that not in the dist directory
* Changed the vite configuration so that we have stable file names for assets
* Added `idb` - used for persisting the tapestry in IndexedDB while offline
* Added `file-type` - a library used for detecting the mimetype of a file by reading its header
* When initializing a tapestry in case we are offline the tapestry is fetched from IndexedDB and the latest version is commited to the repo
* When going back online we are making a diff between the local and remote tapestries and flushing the changes to the server (currently the local tapestry overwrites the remote; this could of course be improved upon)
* To that end extracted some utility function that create patches based of two dtos
* Created a DB service that is intantiated by the data sync and used to persist the tapestry while offline.
* It provides a schema of models for a tapestry, items, rels, groups and presentation steps
* It provides an interface for:
* `upsert`ing - this happens when we go offline.
* `patch`ing - accepts an array of patches and applies the corresponding changes in the database
* `get`ing - fetches a `TapestryDto` along with its `PresentationStepDto[]`
* Small refactoring around file uploads
* Removed the pending state (along with the prepare function)
* When creating a media item an object url is directly assigned as its source without passing the file to the `ItemUploadObservable`
* When uploading an item the blob url is converted to a file (using the **file-type** library in order to get its media type)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added manifest.json, thus making the app installable
Added a couple of screenshots used by app installers
Added support for opening zip files with the tapestry app
Caching all assets needed by the application
Created a vite plugin to ensure that all built web assets are included by the service worker and also there are no assets referenced by the service worker that not in the dist directory
Changed the vite configuration so that we have stable file names for assets
Added
idb- used for persisting the tapestry in IndexedDB while offlineAdded
file-type- a library used for detecting the mimetype of a file by reading its headerWhen initializing a tapestry in case we are offline the tapestry is fetched from IndexedDB and the latest version is commited to the repo
When going back online we are making a diff between the local and remote tapestries and flushing the changes to the server (currently the local tapestry overwrites the remote; this could of course be improved upon)
Created a DB service that is intantiated by the data sync and used to persist the tapestry while offline.
upserting - this happens when we go offline.patching - accepts an array of patches and applies the corresponding changes in the databasegeting - fetches aTapestryDtoalong with itsPresentationStepDto[]Small refactoring around file uploads
ItemUploadObservable