-
- Downloads
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
Showing
- src/metabase/api/timeline.clj 27 additions, 5 deletionssrc/metabase/api/timeline.clj
- src/metabase/api/timeline_event.clj 9 additions, 7 deletionssrc/metabase/api/timeline_event.clj
- src/metabase/models/timeline.clj 11 additions, 0 deletionssrc/metabase/models/timeline.clj
- src/metabase/models/timeline_event.clj 0 additions, 4 deletionssrc/metabase/models/timeline_event.clj
- test/metabase/api/timeline_test.clj 10 additions, 3 deletionstest/metabase/api/timeline_test.clj
Loading
Please register or sign in to comment