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

Service integration and more #75

Merged
merged 8 commits into from
Feb 8, 2025
Merged

Service integration and more #75

merged 8 commits into from
Feb 8, 2025

Conversation

jsheunis
Copy link
Collaborator

@jsheunis jsheunis commented Feb 8, 2025

Apart from some styling and UX updates, this PR mainly advances the service integration functionality, i.e. fetching metadata from a configurable endpoint, and pushing updated metadata to a configurable endpoint.

Summary:

  • Adds configurable opt-in functionality for fetching data from service endpoints. The main changes include:
    • new additions to the config file to opt in to this function and to provide the endpoints with parameterization
    • including functions for fetching data in the main shaclvue component (multiple records of a class, and a single record by id) and the InstancesSelectEditor.
    • adding the actual request funcitonality to the graphdata composable. This changes the workflow to return promises which is also why the dynamic component instantiation code in the propertyshapeeditor has to be wrapped in a suspense tag.
    • a new update to read additional prefixes from config
  • Adds base functionality for user to add a token: adds the composables and components and further functions for asking for a token to be entered when a user opts to submit their edited data. The token is stored in sessionStorage and subsequently made part of any future GET or POST request to the configured service. Submit button is a simple icon in the app header bar.
  • WIP functionality for form submission:
    • io is updated to allow POST requests using the fetch-lite package
    • io now handles error responses in an improved way
    • formdata composable is updated to include generalised functionality for handling conversion of form data to quads in an rdf.dataset (TODO: refactor the existing saveForm funcitonality to use this)

Form submission is now ready to be tested locally.

This happened during the extended troubleshooting process of the recursive
updates issue. The line of code was erroneously removed but it is needed
for the correct behaviour of arrays of triples in the formData.

In addition, indentation in the  formdata composable has been standardised to 4 spaces
This adds the composables and components and further functions
for asking for a token to be entered when a user opts to submit
their edited data. The token is stored in sessionStorage and
subsequently made part of any future GET or POST request to
the configured service. Submit button is a simple icon in the
app header bar.
This adds configurable opt-in functionality for fetching data

from service endpoints. The main changes include:
- new additions to the config file to opt in to this function
  and to provide the endpoints with parameterization
- including functions for fetching data in the main shaclvue
  component (multipl records of a class, and a single record
  by id) and the InstancesSelectEditor.
- adding the actual request funcitonality to the graphdata
  composable. This changes the workflow to return promises
  which is also why the dynamic component instantiation code
  in the propertyshapeeditor has to be wrapped in a suspense
  tag.
- a new update to read additional prefixes from config
- io is updated to allow POST requests using the fetch-lite package
- io now handles error responses in an improved way
- formdata composable is updated to include generalised functionality
  for handling conversion of form data to quads in an rdf.dataset
  (TODO: refactor the existing saveForm funcitonality to use this)
@jsheunis jsheunis merged commit 51fb1be into main Feb 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant