Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Element Selector for UI #1305

Conversation

olzzon
Copy link
Contributor

@olzzon olzzon commented Oct 25, 2024

About the Contributor

This PR is made on the behalf of BBC

Type of Contribution

This is the framework for selecting elements in UI

Current Behavior

Currently there's no easy way to communicate if something in the UI is selected

New Behavior

This PR adds a SelectedElements Contextprovider in top of rundown tree, so selection of e.g. a segment is reflected in properties panel propertiespanel.
It's a minimal implementation, and the full selection in UI will be added in a PR for the Properties Panel.

Testing

Unit test has been made, and inclusion of @testing-library/react so it's possible to test via the provider.

  • I have added one or more unit tests for this PR

Affected areas

  • As the segment timeline's updates are controlled by withResolvedSegment an isSelected properties is added in it.
  • A testing lib has been added for webUI (@testing-library/react)
  • has been added to Rundown view

Time Frame

This PR should be merged soon, so it can be merged back to bbc.

Status

this is ready to be reviewed

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@olzzon olzzon requested a review from a team as a code owner October 25, 2024 07:33
Copy link
Member

@jstarpl jstarpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I correct in understanding that there will be another PR coming for release52 with the implementation of Selection for other Segment View modes and AdLib list in the Shelf? I think it's important that this works across all Rundown View components?

@jstarpl jstarpl changed the title Feat: Element Selector for UI feat: Element Selector for UI Oct 25, 2024
@olzzon
Copy link
Contributor Author

olzzon commented Oct 25, 2024

Am I correct in understanding that there will be another PR coming for release52 with the implementation of Selection for other Segment View modes and AdLib list in the Shelf? I think it's important that this works across all Rundown View components?

Yes, the segmentTimeline implementation is just to guide an implementation.
All selection implementation will be (as described in this PR) together with the Properties panel

@nytamin nytamin added the Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) label Oct 28, 2024
@nytamin
Copy link
Contributor

nytamin commented Dec 10, 2024

We need to solve a few merge errors and build issues before we can merge this.
I've made an initial attempt at the branch bbc-sync/feat/pr-upstream-for-elemement-selector-for-ui, but it still need some more attention.

…-selector-for-ui

# Conflicts:
#	packages/webui/src/client/ui/RundownView.tsx
#	packages/webui/src/client/ui/SegmentTimeline/SegmentTimelineContainer.tsx
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.14%. Comparing base (11ddc3a) to head (fc0046b).
Report is 2 commits behind head on release52.

Additional details and impacted files
@@              Coverage Diff               @@
##           release52    #1305       +/-   ##
==============================================
+ Coverage      61.31%   83.14%   +21.83%     
==============================================
  Files            468      154      -314     
  Lines          82107    30745    -51362     
  Branches        4684     2568     -2116     
==============================================
- Hits           50340    25564    -24776     
+ Misses         31674     5149    -26525     
+ Partials          93       32       -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@olzzon
Copy link
Contributor Author

olzzon commented Dec 11, 2024

This will be a part of the upcoming Properties panel, so this PR will be closed.

@olzzon olzzon closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution from BBC Contributions sponsored by BBC (bbc.co.uk)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants