Open jwaspin opened 1 year ago
This feature is complete but mdProfiles and mdKeywords need to be updated before merging this PR.
@jwaspin I noticed two problems.
I tried loading a manifest file from another location (https://raw.githubusercontent.com/hmaier-fws/ak-md-profiles/dev/ak-manifest.json) and received the following error:
TypeError: e.thesauri is not iterable (cannot read property undefined) at e.loadCustomProfilesFromUrl
It looks like it's trying to read thesauri. But not all custom profiles will have thesauri. I tried it with another manifest that pointed to profile definitions that had a null thesaurus array (https://raw.githubusercontent.com/hmaier-fws/ak-md-profiles/dev/ak-manifest2.json). That did work.
A check needs to be added that allows a definition without a thesaurus to be loaded. A profile definition file is not required to contain all sections.
Loading the query parameter works fine from "/dashboard?loadProfilesFrom=" but it won't work from the hashed url "/#/dashboard?loadProfilesFrom=". The production version of the editor is served using a hashed url (https://go.mdeditor.org/#/).
@hmaier-fws Fixed both issues.
Loading Dynamic Profiles
The current dynamic profile loading process includes the NGGDPP profiles by default. This is not desirable so we want to decouple those profiles from the core profiles.
Using an input box on the profiles' settings page, we can load a secondary set of profiles dynamically, which would allow for the use of anyone's custom profiles, so long as they are formatted as a proper
manifest.json
file.Custom profiles loaded from the URL should be stored the same way other custom profiles are stored - noting that this is separate from how the core profiles are loaded.
Checklist:
Profile manifest file
A profile manifest file is a JSON file containing an array of one or more references to mdEditor profile definitions. The format is as follows:
Example manifest file