Skip to content

feat(dashboards): integrate text widget visualization into product#110245

Merged
nikkikapadia merged 15 commits intomasterfrom
nikki/text-widget/integrate-widget
Mar 12, 2026
Merged

feat(dashboards): integrate text widget visualization into product#110245
nikkikapadia merged 15 commits intomasterfrom
nikki/text-widget/integrate-widget

Conversation

@nikkikapadia
Copy link
Copy Markdown
Member

@nikkikapadia nikkikapadia commented Mar 9, 2026

This PR integrates the text widget visualization into the WidgetCard component and the WidgetViewerModal. The option to select text widgets in the widget builder is not yet put in and will be my next PR.

I have a dashboard where i've created a text widget with hacks that you can use to test this called "Text widget test".

Note: editing the widget will not work yet, this is just to get the visualization into the "viewing" surfaces of dashboards.

Closes DAIN-1319
Closes DAIN-1318

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 9, 2026
@nikkikapadia nikkikapadia marked this pull request as ready for review March 9, 2026 20:27
@nikkikapadia nikkikapadia requested a review from a team as a code owner March 9, 2026 20:27
Copy link
Copy Markdown
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense just a few nits!

@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 11, 2026

Copy link
Copy Markdown
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

The new modal looks reasonable except I think it might have copied too much stuff from the regular modal?


const HALF_CONTAINER_HEIGHT = 300;

const shouldWidgetCardChartMemo = (prevProps: any, props: any) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm, since this widget doesn't load any data, does it need memoization?

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link
Copy Markdown
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Just a few more nits, almost good to go!

Comment on lines +70 to +74
<Stack gap="md">
<Flex align="center" gap="sm">
<Heading as="h3">{widget.title}</Heading>
</Flex>
</Stack>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Redundant Stack, I think? There's just one element

direction="column"
height={`${HALF_CONTAINER_HEIGHT}px`}
position="relative"
paddingBottom="2xl"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This paddingBottom is a little suspicious, same with the Fragment around? Are these needs? Would be better to use a gap in the wrapper element to space things out

Copy link
Copy Markdown
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

👍🏻

@nikkikapadia nikkikapadia merged commit 62a5b42 into master Mar 12, 2026
63 checks passed
@nikkikapadia nikkikapadia deleted the nikki/text-widget/integrate-widget branch March 12, 2026 17:59
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants