Metadata
- Source
- SJRK-265
- Type
- Task
- Priority
- Major
- Status
- Closed
- Resolution
- Duplicate
- Assignee
- N/A
- Reporter
- Gregor Moss
- Created
2019-07-29T17:40:33.767-0400 - Updated
2020-01-24T13:34:43.000-0500 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Storytelling Tool UI
Description
The contents of storyTellingServerUI.js are unwieldy and would better be placed in different files according to when and how they are used. This may involve the use of events and attaching to the onCreate event of page components or another approach.
From pull request feedback provided by Cindy Li:
... I actually think all functions in this file can be moved into components and all workflows can be incorporated and controlled by individual components. Use "Browse story" as an example:
- move the fetch of "/clientConfig" into "sjrk.storyTelling.base.page"
onCreate
event; - The retrieval of stories to "/stories" endpoint can be moved to "sjrk.storyTelling.base.page.storyBrowse" component, in parallel with the fetch of "/clientConfig". It also fires an event "onStoriesReady" when stories are received.
- The aggregate event for{{onClientConfigReady + onStoriesReady}} controls other parts such as the load of custom theme files, the instantiation of templateManager and the page rendering.