-
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
Beds 1037/large dashboards should not load slot viz icons and absolute values #1303
Beds 1037/large dashboards should not load slot viz icons and absolute values #1303
Conversation
- This change affects all files that use the reactive values of the store, so that they keep their reactivity - Additionally, add `loading` state to the store
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 can imagine this was a very challenging task, although it sounded very easy.
Nice how deep you digged into the architecture
of the concerned components and that you took the chance to simplify things and create a cleaner data flow.
Some things grew in complexity, that happens sometimes, especially when you are unfamiliar with the code base and everything is tightly coupled.
In general we should not add more complexity, but abort refactoring (thats also one benefit of a clean commit structure, that we could take commits out, e.g. into another branch). But this time it does not hurt us to stay with your current implementation.
Good work in respect to the unforeseeable complexity 💪
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
class="dashboard-slot-viz-group-selector" | ||
@update-selected-group-ids="(newGroupIdSelection) => selectedGroupIds = newGroupIdSelection" | ||
/> | ||
</div> | ||
|
||
<div | ||
v-if="(loadingSlotViz && !refetchingSlotViz) || (loadingOverview && !!dashboardKey)" |
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.
We talked already how this refactoring worked out for you, so I understand that such things happen sometimes.
I just have to point out that this is too complex and can for sure be avoided in the future.
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.
This brings up a good point: I was setting loading = true
in the validator_overview_store
too early, and it remained true even if the fetch wasn't performed by lack of dashboardKey
in the case of guest dashboards. I can now remove the !!dashboardKey
at least.
frontend/components/dashboard/slot-viz/DashboardSlotVizDutyVisibilityToggle.vue
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
dbe0096
to
5e92a8e
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.
Great review, thanks 👍
@@ -13,6 +13,7 @@ | |||
"DashboardChartSummary", | |||
"DashboardChartSummaryFilter", | |||
"DashboardGroupManagementModal", | |||
"DashboardSlotViz", |
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 rephrased the commit message and removed the scope
@@ -103,6 +105,7 @@ watch( | |||
</BcTooltip> | |||
|
|||
<DashboardSlotVizDutyVisibilityToggle | |||
:initially-hide-visible="isSharedDashboard && !!isLargeDashboard" |
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 it's ugly. I removed it and used the values directly in DashboardSlotVizDutyVisibilityToggle
class="dashboard-slot-viz-group-selector" | ||
@update-selected-group-ids="(newGroupIdSelection) => selectedGroupIds = newGroupIdSelection" | ||
/> | ||
</div> | ||
|
||
<div | ||
v-if="(loadingSlotViz && !refetchingSlotViz) || (loadingOverview && !!dashboardKey)" |
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.
This brings up a good point: I was setting loading = true
in the validator_overview_store
too early, and it remained true even if the fetch wasn't performed by lack of dashboardKey
in the case of guest dashboards. I can now remove the !!dashboardKey
at least.
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
frontend/stores/dashboard/useValidatorDashboardOverviewStore.ts
Outdated
Show resolved
Hide resolved
const isLargeDashboard = computed(() => { | ||
if (!validatorCount.value) return false | ||
|
||
// This value is a product decision from Bitfly, and doesn't stem from any mechanism in the blockchains we handle. |
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.
// This value is a product decision from Bitfly, and doesn't stem from any mechanism in the blockchains we handle. | |
// this amount is a product decision |
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.
thx
- default visible duties depend on the dashbnoard being `shared` and over or under 64 validators - loading/intermediate states are added to prevent flashes on the visible duties when changing dashboards See: BEDS-1037
5e92a8e
to
e2c3d79
Compare
Changes:
SlotViz:
SlotViz
iconsslot-viz
section (duties toggle, group selector and slots)slot-viz fetch
that happened between changing dashboard and loading group-selectorSummary table:
ValidatorDashboardOverviewStore
Restructure of
SlotViz
section: