-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
FieldOptions: Revert scalable unit option as we already support this via custom prefix/suffixes #81893
Conversation
This PR must be merged before a backport PR will be created. |
grafana-dataRemovalsFieldConfig.unitScale/home/runner/work/grafana/grafana/base/grafana-data/dist/index.d.ts unitScale?: boolean; |
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 understand your point on adding this option is probably too heavy handed approach given amount of upvotes on the original issue.
Regarding the workaround using custom units I think this may be a little obscure / hard to discover for users, especially when the unit is already supported by grafana but to get their desired scaling behavior they must add it as a custom unit - this seems a little counterintuitive at least to me 🤷🏻♂️ I would argue that the new option that was added is easier to discover. It feels like this option with some modification / improvement could be a more straightforward way to manage this for users
Is removing this option the only path forward here? I understand that in its current state it is also causing confusion for users as it doesn't apply to most units but maybe that's something that's solvable with renaming (I.e. "Metric unit auto scaling", we could even list out supported units as part of the option UI in a tooltip or something)
I will defer to you on this - if we do end up removing this I suggest that we add a section in docs underneath units section about the current custom unit workaround. We will also need to update the 10.3 what's new content to remove mention of this feature
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-81893-to-v10.3.x origin/v10.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 1fe32ce36ead4f27a8c56d7789beb8b11a17d7ae When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-81893-to-v10.3.x
# Create the PR body template
PR_BODY=$(gh pr view 81893 --json body --template 'Backport 1fe32ce36ead4f27a8c56d7789beb8b11a17d7ae from #81893{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.3.x] FieldOptions: Revert scalable unit option as we already support this via custom prefix/suffixes " --body-file - --label "type/docs" --label "area/frontend" --label "add to changelog" --label "no-backport" --label "levitate breaking change" --label "backport" --base v10.3.x --milestone 10.3.x --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-81893-to-v10.3.x
# Create a pull request where the `base` branch is `v10.3.x` and the `compare`/`head` branch is `backport-81893-to-v10.3.x`.
# Remove the local backport branch
git switch main
git branch -D backport-81893-to-v10.3.x |
…via custom prefix/suffixes (#81893) * StandardFieldOptions: Revert scalable unit option * forgot to save merge fixes
reverts #79411
Does not work for the majority of units that scale, feels like adding another standard option that will show up in 99% of panels is not great solution for an issue with only 2 👍 , we have support custom suffix/prefix via the standard unit option for anyone who wants to just get a suffix or prefix