Skip to content
Snippets Groups Projects
Unverified Commit fca980fb authored by adam-james's avatar adam-james Committed by GitHub
Browse files

Default Icon for Timelines / Events and Root Collection Hydration (#21201)

* Timeline has default icon, Timeline Event default icon from Timeline

* Move the icon schema to Timeline model.

The 'default icon' of a Timeline is concretely 'star', whereas the default icon for an event is taken from the
Timeline it's part of, which could be any of the icons.

Since the default should be one of the icons listed in the Schema, it makes sense for readability that the icon schema
is in the same namespace.

* When timeline's collection_id is nil, build the root collection

Timeline's always have :collection_id, and when the ID is a proper ID, :collection hydration works properrly. When the
ID is nil, we don't pass the necessary data to the frontend. So, match the behaviour for the `GET
/api/collection/root` endpoint and use that data on the :collection key

* Add root collection hydration to GET /api/timeline

* Add tests for collection hydration and timeline default icons
parent 3eb0d2c2
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment