mi6 / ic-ui-kit

Intelligence Community UI Kit (based on StencilJS)
MIT License
25 stars 27 forks source link

[all components]: Review component behaviour when loading data asynchronously #1750

Open jd239 opened 7 months ago

jd239 commented 7 months ago

Summary

There have been issues with our components when loading data in asynchronously. For example, some components are initially set with an empty array. Once data is loaded in, there are instances where the component generates errors, data is not updated on the component or functionality stops working.

๐Ÿ’ฌ Description

This ticket is to review all the components which deal with data being added asynchronously like checkboxes and radio buttons (https://github.com/mi6/ic-ui-kit/issues/1749). A good test is to initially set the component with empty options and then populating using setTimeout.

๐Ÿ’ฐ Use value

Most data is sideloaded so this will cover the general approach to using a backend and API to retrieve data for the UI components.

๐Ÿ“ Acceptance Criteria

If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

Given a developer side loading data When data is initially empty and then populated
Then the component should work as expected without any console errors or issues with functionality

โœ Designs

N/A

๐Ÿงพ Guidance

N/A

Additional info

An example of this error is demonstrated in this ticket: https://github.com/mi6/ic-ui-kit/issues/1749

MI6-255 commented 4 months ago

Wait to refine until all bug hunts have been completed

8th Aug: We've decided we need one more bughunt before addressing this