Skip to content

Conversation

@nicfv
Copy link
Collaborator

@nicfv nicfv commented Dec 21, 2024

@nicfv nicfv self-assigned this Dec 21, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2024

Bundle Size Changes

Hello! 👋 This comment was generated by a Github Action to help you and reviewers understand the impact of your PR on frontend bundle sizes.

Whenever this PR is updated, this comment will update to reflect the latest changes.

EntryPoint Size % Diff
module 185.83 KB (-3.65 KB) -1.93%
Files Total bundle size % Diff
9 617.89 KB (-3.06 KB) -0.49%
View detailed bundle information

Added

No assets were added

Removed

No assets were removed

Bigger

Name Size % Diff
CHANGELOG.md 1.69 KB (+260 Bytes) +17.66%
README.md 6.38 KB (+227 Bytes) +3.60%
plugin.json 1.35 KB (+117 Bytes) +9.23%

Smaller

Name Size % Diff
module.js 185.83 KB (-3.65 KB) -1.93%
View module information

Added

Name Size % Diff
./defaults.ts 101.07 KB (+101.07 KB) -
./components/ACESVGPanel.tsx 8.39 KB (+8.39 KB) -
./components/SVGMapping.tsx 2.05 KB (+2.05 KB) -
./components/SVGMappings.tsx 1.78 KB (+1.78 KB) -
./components/SVGMappingAdd.tsx 1.1 KB (+1.1 KB) -
./components/SourceCode.tsx 856 Bytes (+856 Bytes) -
./components/SVGMappingItem.tsx 785 Bytes (+785 Bytes) -

Removed

Name Size % Diff
./examples.ts 0 Bytes (-103.98 KB) -100.00%
./options.tsx 0 Bytes (-9.69 KB) -100.00%
./ACESVGjsPanel.tsx 0 Bytes (-8.41 KB) -100.00%

Bigger

Name Size % Diff
./module.ts 3.2 KB (+2.9 KB) +971.57%

Smaller

No modules were smaller

@nicfv nicfv mentioned this pull request Dec 21, 2024
@nicfv
Copy link
Collaborator Author

nicfv commented Jan 5, 2025

if (clicked.id) {
while (clicked.id === '') {
loopCount++;
if (loopCount > 20) {
return;
}
clicked = clicked.parentNode as Element;
}

I don't think this is necessary. Basically will skip the proceeding logic of checking parent ID's if the clicked element does not have an ID.

@nicfv
Copy link
Collaborator Author

nicfv commented Feb 2, 2025

Apparently, hooks are not allowed in class components, so I had to use something like a higher order component to achieve the use of useTheme2(): https://stackoverflow.com/questions/53371356/how-can-i-use-react-hooks-in-react-classic-class-component

private renderSVG(element: SVGSVGElement | SVGDom | null): string | null {
if (element) {
if (
this.props.options.initSource !== this.state.initFunctionSource ||
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is why there were so many state variables...you need them to determine if the panel needs to be reinitialized.

@github-actions
Copy link
Contributor

Playwright test results

Image Name Version Result Report
grafana-dev 12.0.0-238920
grafana-enterprise 11.6.0
grafana-enterprise 11.4.3
grafana-enterprise 11.2.8
grafana-enterprise 11.0.11
grafana-enterprise 10.4.17

⚠️ To make Playwright reports for failed tests publicly accessible on GitHub Pages, set the upload-report input to true in your CI workflow. For more details, refer to the Developer Portal documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mapped name clears Option to get currently loaded Grafana theme

2 participants