Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T TIDO
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 113
    • Issues 113
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • subugoesubugoe
  • emoemo
  • TIDO
  • Merge requests
  • !116

feat: adjust content type/s according to the recently introduced content key from the API

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged schneider210 requested to merge feature/#151-api-content-key into develop Feb 24, 2021
  • Overview 14
  • Commits 7
  • Pipelines 5
  • Changes 5

Feature

Summary

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

  • minor:

additionally rename the css class rtl-support to rtl to match explicitely against it's config counterpart of the same name

Pls note:

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.

Hence:

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.

Does the result of the MR comply to our "definition of done"?

  • Unit tests passed
  • Code reviewed
  • Acceptance criteria met
  • Functional tests passed
  • Non-Functional requirements met
  • Product Owner accepts the User Story

Documentation

  • I updated the README (if applicable)
  • I provided my functions with appropriate documentation
  • I adjusted other parts of the documentation (if applicable)

Tests

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 index.template.html file to: https://ahikar-test.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json
  • watch the content resource still to be displayed inside the text panel as usual
  • No, it is not possible.

Changelog

  • I added a statement to the CHANGELOG.

No, it will be done automatically by npm write-changelog at the end of the actual sprint.

Related Tickets

Add all related issues and especially those to be closed.

Related

Related "${165}"

Closes

Closes #151 (closed)

Logs and Screenshots

/cc Mathias Göbel, Frank Schneider, Michelle Weidling

Edited Feb 26, 2021 by schneider210
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/#151-api-content-key