Add query parameter for contextual views
Objective: Implement the ability to display a work item in a drawer or modal using a query parameter.
Description:
We need to enhance our platform to support displaying work items in a drawer or modal from any other view. This will be achieved by adding a query parameter that triggers the contextual view.
Implementation Proposal:
- Replace the
?work_item_iid
query param with?show
, and use an id for the value rather than iid. - Continue to support
?work_item_iid
links (these may be dropped later)
Original proposal
Implementation Proposal:
-
Query Parameter:
- Introduce a query parameter to specify the type of contextual view:
drawer=work_item
modal=work_item
- Introduce a query parameter to specify the type of contextual view:
-
Parameter Details:
- The query parameter should accept additional details to identify the specific work item, e.g.,
?drawer=work_item&id=12345
, orwork-item-drawer=:iid
- The query parameter should accept additional details to identify the specific work item, e.g.,
-
Routing and Navigation:
- Update the routing logic to detect the presence of the
drawer
ormodal
query parameter. - Ensure that the appropriate component (drawer or modal) is rendered when the parameter is present.
- Update the routing logic to detect the presence of the
-
Component Development:
- Develop or update the drawer and modal components to accept work item details through props or state.
- Ensure these components can fetch and display the correct work item based on the provided ID.
-
User Experience:
- Ensure smooth transitions and a seamless user experience when navigating to a view with the query parameter.
- Implement appropriate loading states and error handling.
Acceptance Criteria:
- A query parameter (
drawer
ormodal
) can be used to trigger the display of a work item in a drawer or modal. - The drawer or modal component correctly fetches and displays the specified work item.
- Smooth user experience with proper loading states and error handling.
- Instrument usage of component.
Edited by Simon Knox