Skip to content
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

fix: LEAP-1792: Prevent empty tooltip for ControlButton #7083

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Gondragos
Copy link
Collaborator

@Gondragos Gondragos commented Feb 14, 2025

Refactored tooltip rendering logic in the ControlButton to avoid wrapping buttons with empty tooltips. Introduced a constant for the empty tooltip message to improve code clarity and consistency.

PR fulfills these requirements

  • Commit message(s) and PR title follow the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • The best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

image

Empty tooltips on the custom controls.

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Refactored tooltip rendering logic in ControlButton to avoid wrapping buttons with empty tooltips. Introduced a constant for the empty submit tooltip message to improve code clarity and consistency.
@github-actions github-actions bot added the fix label Feb 14, 2025
Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 8a3823e
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67b73d30dcc1d800080ef755

Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 8a3823e
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67b73d304576be00085230e5

@Gondragos
Copy link
Collaborator Author

Gondragos commented Feb 14, 2025

/git merge develop

Workflow run
Successfully merged: Already up to date.

@Gondragos
Copy link
Collaborator Author

Gondragos commented Feb 20, 2025

/git merge

Workflow run
Successfully merged: 9 files changed, 116 insertions(+), 58 deletions(-)

@@ -41,23 +41,31 @@ type ControlButtonProps = {
onClick: (e: React.MouseEvent) => void;
};

export const EMPTY_SUBMIT_TOOLTIP = "Empty annotations denied in this project";
Copy link
Contributor

Choose a reason for hiding this comment

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

minor note here - certainly non-blocking - but i see we're exporting it but we dont use it outside of this file

Suggested change
export const EMPTY_SUBMIT_TOOLTIP = "Empty annotations denied in this project";
const EMPTY_SUBMIT_TOOLTIP = "Empty annotations denied in this project";

@Gondragos
Copy link
Collaborator Author

Gondragos commented Feb 20, 2025

/git merge

Workflow run
Successfully merged: 7 files changed, 24 insertions(+), 14 deletions(-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants