-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: handle adding/removing tiles (widgets) #1944
Conversation
c268a88
to
223b37c
Compare
223b37c
to
1674048
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to review.
<DashboardRenderer | ||
ref="dashboardRendererRef" | ||
can-remove-tiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly a note for later: I think we should combine this and draggable
into one editable
prop -- or possibly even just check if the event listeners are defined rather than having separate props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just combined them to a can-edit
prop
77a09cf
to
a02e33e
Compare
a02e33e
to
b88f1d7
Compare
9d97ff6
to
fdffa2a
Compare
09cf80f
to
8ebfceb
Compare
c9e4779
to
9d8f145
Compare
a51454d
to
b916631
Compare
b916631
to
869eaba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A handful of minor comments -- looking at the other preview.
packages/analytics/dashboard-renderer/src/components/DashboardRenderer.vue
Outdated
Show resolved
Hide resolved
packages/analytics/dashboard-renderer/sandbox/pages/DynamicDashboardDemo.vue
Outdated
Show resolved
Hide resolved
packages/analytics/dashboard-renderer/sandbox/pages/EditableDashboardDemo.vue
Show resolved
Hide resolved
@@ -603,6 +603,7 @@ describe('<DashboardRenderer />', () => { | |||
tileHeight: 167, | |||
tiles: [ | |||
{ | |||
id: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, this is to make sure the test IDs stay consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the ids became random uuids since they aren't provided, manually set them to 0, 1, 2... in order to keep the test sane.
Summary
https://konghq.atlassian.net/browse/MA-3668
https://konghq.atlassian.net/browse/MA-3622
https://konghq.atlassian.net/browse/MA-3621
await nextTick()
then usemakeWidget
to make the newly added tile into a gridstack widget.can-edit
prop