-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore: stat widget polish #33696
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
chore: stat widget polish #33696
Changes from all commits
c7b4fe8
bbf54ea
153f0ba
69680d4
07db79d
1913af0
ecf65a9
cc3245e
46a4270
a38e37a
b4f380c
cdfcce6
30c8b31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -544,6 +544,7 @@ export function getWidgetSessionValues( | |||||
|
|
||||||
| let widgetType = type; | ||||||
| const configMap = WidgetFactory.widgetConfigMap.get(type); | ||||||
|
|
||||||
| const widgetSessionValues: any = {}; | ||||||
|
|
||||||
| // in case we are dropping WDS_ICON_BUTTON_WIDGET, we want to reuse the values of BUTTON_WIDGET | ||||||
|
|
@@ -552,7 +553,7 @@ export function getWidgetSessionValues( | |||||
| } | ||||||
|
|
||||||
| for (const key in configMap) { | ||||||
| if (configMap[key]) { | ||||||
| if (configMap[key] != undefined) { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use strict inequality operator - if (configMap[key] != undefined) {
+ if (configMap[key] !== undefined) {Committable suggestion
Suggested change
|
||||||
| let sessionStorageKey = `${widgetType}.${key}`; | ||||||
|
|
||||||
| if (type === "ZONE_WIDGET") { | ||||||
|
|
||||||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import type { StatsWidgetProps } from "../widget/types"; | ||
|
|
||
| export interface StatsComponentProps extends StatsWidgetProps {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| import type { AnvilConfig } from "WidgetProvider/constants"; | ||
|
|
||
| export const anvilConfig: AnvilConfig = { | ||
| isLargeWidget: true, | ||
| isLargeWidget: false, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not enough because
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| widgetSize: { | ||
| minWidth: "100%", | ||
| minWidth: { | ||
| base: "100%", | ||
| "180px": "sizing-30", | ||
| }, | ||
| }, | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { WIDGET_TAGS } from "constants/WidgetConstants"; | ||
|
|
||
| export const metaConfig = { | ||
| name: "Statbox", | ||
| name: "Stats", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just wondering why the name was changed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was there in list of things we need to do in the polish. |
||
| needsMeta: false, | ||
| isCanvas: false, | ||
| searchTags: ["statbox"], | ||
|
|
||



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.
Specify a more precise type instead of
any.Committable suggestion