This MR provides the adjusted content object according to the API specs for TIDO
It serves as a prerequisite for Enable TIDO to display more (+n) text types as tabs and ensures (so far), that the content resource is fetched and displayed as ususal in the text panel although the (content) data has changed.
What have I done?
- adjust datatype:
the formerly contenturl which used to be a string now becomes an array of an arbitrary number of objects; each holding a url and a mime-time with an optional sybtype, whereas the latter isn't taken into account yet.
- provide new method getContent()
since TIDO is supposed to display any type of html resource, the method checks the corresponding mime-types and - in case of matching - extracts the appropriate urls which in turn point to the according html resources
- provide a (very basic) unit test
it just ensures that the prop in the receiving component is present and is of type array
additionally rename the css class rtl-support to rtl to match explicitely against it's config counterpart of the same name
this is sort of a collaboration between the back- and the frontend. both parties depend on each other. means: the changes haven't been merged in the backend, otherwise the Viewer would certainly break before this MR is merged.
to build it, it has been necessary to have some sampledata to see it in action. so I had to use the entrypoint of the karshuni collection on the test-server. Pls see below's instructions on how to verify it.
Unit tests passed
Acceptance criteria met
Functional tests passed
Non-Functional requirements met
Product Owner accepts the User Story
I updated the README (if applicable)
I provided my functions with appropriate documentation
I adjusted other parts of the documentation (if applicable)
Are we able to test this new feature?
Yes, everything can be done via unit tests.
Yes, you can test by following these steps:
- check out the branch:
git checkout feature/#151-api-content-key
- change the entrypoint in the
- watch the content resource still to be displayed inside the text panel as usual
No, it is not possible.
I added a statement to the CHANGELOG.
No, it will be done automatically by
npm write-changelog at the end of the actual sprint.
Add all related issues and especially those to be closed.
Closes #151 (closed)