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/UI useredit panel #22

Merged
merged 93 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
2b4c08c
wip: initial draft implementation of userEditPanel
olzzon Oct 14, 2024
c1e8e10
wip: userEditPanel grouping
olzzon Oct 15, 2024
fb54ad2
wip: userEditPanel cleanup remove schema as it's replaces by schemas
olzzon Oct 16, 2024
7fd9bf1
wip: userEditPanel styling and use <select> for list
olzzon Oct 16, 2024
040dbc4
wip: userEditPanel - make groupType optional to allow empty slots
olzzon Oct 16, 2024
d49b265
wip: userEditPanel - convert to FC
olzzon Oct 16, 2024
d93d0a9
wip: userEditPanel - uncomment context menu
olzzon Oct 17, 2024
9cbc324
wip: UserEditPanel - Add DefaultUserOperationsTypes for revert button…
olzzon Oct 17, 2024
0643ff3
wip: UserEditPanel - Default revert button on panel
olzzon Oct 17, 2024
9d46129
wip: UserEditPanel - tracker on part and segment
olzzon Oct 17, 2024
27a2680
wip: UserEditPanel - only render Segment or Part in panel
olzzon Oct 21, 2024
298d10c
wip: UserEditPanel - initial header for part and segment
olzzon Oct 21, 2024
526211e
wip: UserEditPanel - comment for the usage of getTimePosition
olzzon Oct 21, 2024
a673847
wip: UserEditPanel - add Icons in header
olzzon Oct 21, 2024
5324fa3
wip: UserEditPanel - add button type in UserEditingDefinitions
olzzon Oct 21, 2024
c8b7e79
wip: UserEditPanel - rename revert button to "Revert Changes"
olzzon Oct 21, 2024
a1fc06b
wip: UserEditPanel - add support for SVG icons in grouping (e.g for s…
olzzon Oct 22, 2024
c76ec35
wip: UserEditPanel - center revert button
olzzon Oct 22, 2024
c6d0bf5
wip: Renaming UserEditPanel to PropertiesPanel
olzzon Oct 22, 2024
163cb46
wip: UI selection - Context for SelectedElements
olzzon Oct 23, 2024
e037d59
wip: UI selection - refactor from useState() to useReducer()
olzzon Oct 24, 2024
7fe136f
wip: UI selection - use type for SelectedElement
olzzon Oct 24, 2024
061d61f
wip: UI selection -Segment not updating upon selection
olzzon Oct 24, 2024
2a252e8
feat: unit tests for SelectedElementsContext
olzzon Oct 24, 2024
1710bb4
wip: UI selection - add isSelected to withSegmentTiming
olzzon Oct 25, 2024
c00b2fd
wip: fix props withSelection
olzzon Oct 25, 2024
3a3b9ff
wip: fix props withSelection
olzzon Oct 25, 2024
02b9a41
wip: remove componentDidUpdate - leftover from previous debugging
olzzon Oct 25, 2024
030163e
fix: added listSelectedElements() instead of exposing the selectedEle…
olzzon Oct 25, 2024
ad46b36
fix: add assertNever() to selectionReducer
olzzon Oct 25, 2024
e760534
fix: remove id and use ElementId as reference in context provider
olzzon Oct 25, 2024
73753f8
fix: clean up isSelected should parse boolean not function as props
olzzon Oct 25, 2024
14e03fe
chore: update package with @testing-library/react
olzzon Oct 25, 2024
cb43189
fix: tests for SelecedElementsContext updated and type fixed
olzzon Oct 25, 2024
875a438
fix: listSelectedElements is af function not an array
olzzon Oct 25, 2024
382179c
wip: implement useSelection in PropertiesPanel
olzzon Oct 25, 2024
3222f65
wip: useSelection on Parts
olzzon Oct 25, 2024
ef2c47d
fix: missing rundown id in propertiespanel actions
olzzon Oct 25, 2024
2ad708a
feat: add enabling of userediting in settings
olzzon Oct 31, 2024
7a79afa
feat: doubleclick on part selection for properties panel
olzzon Oct 31, 2024
2169357
fix: properties panel crash when no selection was made
olzzon Oct 31, 2024
a6a431c
feat: segment selection
olzzon Oct 31, 2024
8dc7700
feat: dbl click anywhere in segment header to select properties
olzzon Oct 31, 2024
48521c6
feat: select part by double clicking a piece
olzzon Oct 31, 2024
8220392
feat: properties panel commit button for pending changes
olzzon Oct 31, 2024
3aaea87
feat: select/deselect an element - fix flickering upen commit changes
olzzon Nov 1, 2024
07bd3ec
fix: render all userEditOperations when part is selected
olzzon Nov 1, 2024
ba03df0
feat: move Properties panel out of notification center logic
olzzon Nov 4, 2024
52a0d54
feat: use context.consumer instead of wrapping
olzzon Nov 4, 2024
8bdc2cd
feat: refactor userEditing structure
olzzon Nov 6, 2024
662681e
feat: properties panel with refactored data structure.
olzzon Nov 6, 2024
091af40
feat: Schema selection implemented in commit button logic
olzzon Nov 6, 2024
4d58ce8
feat: implement Layer colors in group selectors
olzzon Nov 6, 2024
4ef35fd
feat: only parse the selected source on useraction commit
olzzon Nov 7, 2024
525cd59
feat: simplify structure for userEditing source
olzzon Nov 7, 2024
3a5bda0
fix: rerender group selection when selecting new part
olzzon Nov 7, 2024
5e547ce
fix: read the SourceLayerType into UserEditingDefinition
olzzon Nov 7, 2024
3978c2b
feat: selected element indicator
olzzon Nov 7, 2024
6470d43
feat: properties panel styling - is edited indication
olzzon Nov 8, 2024
b674e2d
wip: add close propterties icon (sketch)
olzzon Nov 8, 2024
4bd57d6
wip: properties panel css dim commit+revert when not active
olzzon Nov 8, 2024
cb2455b
wip: properties panel clean up first iteration selector
olzzon Nov 8, 2024
b4d75dd
wip: properties panel add close upper right
olzzon Nov 8, 2024
15d77e8
fix: crash UI - remove transiongroup
olzzon Nov 8, 2024
7b65130
feat: properties panel animate in and shrink rundown view
olzzon Nov 8, 2024
8666da3
fix: cleanup using notificationpanel for properties panel
olzzon Nov 8, 2024
631ef97
wip: properties panel, rightbar icon color
olzzon Nov 8, 2024
ad78549
fix: re-run only if part.segmentId has changed
olzzon Nov 9, 2024
d3e0ca7
wip: tests for properties panel
olzzon Nov 9, 2024
5fe974f
wip: properties panel tests - useFaketimers and implement mock useTra…
olzzon Nov 11, 2024
b86bc21
wip: properties panel - element selection styling
olzzon Nov 11, 2024
e6d4c94
wip: properties panel styling edit pencil icon
olzzon Nov 11, 2024
e0969ef
wip: properties panel close when notification is open
olzzon Nov 12, 2024
6a10475
wip: properties panel selection glow on segment header
olzzon Nov 12, 2024
61c73a0
feat: StyledSchemaFormInPlace schema component
olzzon Nov 13, 2024
958d8e3
fix: Properties panel - StyledSchemaFormInPlace schema for normal form
olzzon Nov 13, 2024
7f5fa09
feat: Properties panel is edited pencil styling
olzzon Nov 13, 2024
d623cc6
feat: Properties header styling
olzzon Nov 13, 2024
75b1930
wip: Properties tests - more mocking to get correct rendering in test…
olzzon Nov 13, 2024
91dae54
chore: fix unit tests
mint-dewit Nov 21, 2024
77bf227
feat: refactor form action to properties field
mint-dewit Nov 27, 2024
aa35b1b
chore: update styles
mint-dewit Dec 2, 2024
ea2fb4a
chore: add actions back into property panel
mint-dewit Dec 2, 2024
a671baa
chore: support translations for properties panel
mint-dewit Dec 5, 2024
53488d2
chore: fix some build issues
mint-dewit Dec 5, 2024
ffdde73
Merge pull request #38 from bbc/chore/ui-useredit-properties
mint-dewit Dec 5, 2024
80ae9d8
feat: allow editing piece properties
mint-dewit Dec 6, 2024
50d869e
chore: various review comments
mint-dewit Dec 10, 2024
e4cf90e
chore: fix tests
mint-dewit Dec 11, 2024
91e9431
chore: merge bbc-release52 into feat/ui-useredit-panel
mint-dewit Dec 11, 2024
8f9df89
chore: merge bbc-release52 into feat/useredit-panel
mint-dewit Dec 12, 2024
dedebee
chore: remove unused parameter
mint-dewit Dec 12, 2024
287f007
chore: removed commented styles
mint-dewit Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip: UserEditPanel - add support for SVG icons in grouping (e.g for s…
…plit or DVE backgrounds)
  • Loading branch information
olzzon committed Oct 22, 2024
commit a1fc06b7f6a71a4c9b6ffcad482fc9643691781b
1 change: 1 addition & 0 deletions packages/blueprints-integration/src/userEditing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface UserEditingGroupingType {
filter?: string
label?: string
color?: string
svgIcon?: string
}

export enum UserEditingButtonType {
Expand Down
35 changes: 34 additions & 1 deletion packages/webui/src/client/styles/usereditPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,43 @@
border: 0px;
margin: 4px;
gap: 10px;
color: #ddd;
color: #fff;
opacity: 1;
}

> .usereditpanel-pop-up__groupselector__button-svg {
width: 50px;
height: 30px;
border: 0;
margin: 4px;
color: #ddd;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.2; // default state

&-active {
@extend .usereditpanel-pop-up__groupselector__button-svg;
opacity: 1;
}

> .svg-icon {
width: 100%;
height: 100%;
margin-top: -1px;
display: flex;
align-items: center;
justify-content: center;

svg {
width: 100%;
height: 100%;
display: block;
}
}
}

}

> .usereditpanel-pop-up__action {
Expand Down
105 changes: 55 additions & 50 deletions packages/webui/src/client/ui/UserEditOperations/UserEditPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import { UIParts } from '../Collections'
* UserEditPanelPopUp props.
*/
interface Props {
// Currently selected context menu context
// Plan is to replace this with a more specific selection of what is selected in the UI
// When selected element for UserEditPanel has been implemented
contextMenuContext: IContextMenuContext | null
}

Expand Down Expand Up @@ -163,55 +166,31 @@ export function UserEditPanel(props: Props) {
</>
)}
<div className="usereditpanel-pop-up__footer">
{isPartSelected ? (
<button
className="usereditpanel-pop-up__button"
onClick={(e) => {
rundownId &&
doUserAction(t, e, UserAction.EXECUTE_USER_OPERATION, (e, ts) =>
MeteorCall.userAction.executeUserChangeOperation(
e,
ts,
rundownId,
{
segmentExternalId: segment?.externalId,
partExternalId: part?.externalId,
pieceExternalId: undefined,
},
{
id: DefaultUserOperationsTypes.REVERT_PART,
}
)
)
}}
>
<span className="usereditpanel-pop-up__label">REVERT CHANGES</span>
</button>
) : (
<button
className="usereditpanel-pop-up__button"
onClick={(e) => {
rundownId &&
doUserAction(t, e, UserAction.EXECUTE_USER_OPERATION, (e, ts) =>
MeteorCall.userAction.executeUserChangeOperation(
e,
ts,
rundownId,
{
segmentExternalId: segment?.externalId,
partExternalId: undefined,
pieceExternalId: undefined,
},
{
id: DefaultUserOperationsTypes.REVERT_SEGMENT,
}
)
<button
className="usereditpanel-pop-up__button"
onClick={(e) => {
rundownId &&
doUserAction(t, e, UserAction.EXECUTE_USER_OPERATION, (e, ts) =>
MeteorCall.userAction.executeUserChangeOperation(
e,
ts,
rundownId,
{
segmentExternalId: segment?.externalId,
partExternalId: part?.externalId,
pieceExternalId: undefined,
},
{
id: isPartSelected
? DefaultUserOperationsTypes.REVERT_PART
: DefaultUserOperationsTypes.REVERT_SEGMENT,
}
)
}}
>
<span className="usereditpanel-pop-up__label">REVERT CHANGES</span>
</button>
)}
)
}}
>
<span className="usereditpanel-pop-up__label">REVERT CHANGES</span>
</button>
</div>
</div>
)
Expand Down Expand Up @@ -332,7 +311,7 @@ function EditingTypeChangeSource(props: {
<div className="usereditpanel-pop-up__groupselector">
{props.userEditOperation.grouping &&
groups.map((group, index) => {
return (
return !group.svgIcon ? (
<button
className={
selectedGroup !== group.filter
Expand All @@ -346,7 +325,33 @@ function EditingTypeChangeSource(props: {
}}
disabled={!group.filter}
>
{group.label}
<div
className="svg"
dangerouslySetInnerHTML={{
__html: group.svgIcon || '',
}}
></div>
{!group.svgIcon && group.label}
</button>
) : (
<button
className={
selectedGroup !== group.filter
? `usereditpanel-pop-up__groupselector__button-svg`
: `usereditpanel-pop-up__groupselector__button-svg-active`
}
key={index}
onClick={() => {
setSelectedGroup(group.filter)
}}
disabled={!group.filter}
>
<div
className="svg-icon"
dangerouslySetInnerHTML={{
__html: group.svgIcon,
}}
></div>
</button>
)
})}
Expand Down
Loading