Skip to content

(fix) Make the whole label as tooltip trigger #475

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

Merged
merged 8 commits into from
Apr 29, 2025
Merged

Conversation

vasharma05
Copy link
Member

@vasharma05 vasharma05 commented Mar 13, 2025

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Currently, the i icon is shown on the right hand of the label which is then used to trigger the tooltip. Now the tooltip rendered was getting cropped by the form's wrapper.

Now the whole label is made the tooltip trigger, along with displaying a i icon on the right side of the label.

Screenshots

Before

image

image

After

image

image

Related Issue

Other

Slack thread: https://openmrs.slack.com/archives/C04QZ5DDVMG/p1743764918799569

@vasharma05 vasharma05 requested a review from pirupius March 13, 2025 12:33
Copy link

github-actions bot commented Mar 13, 2025

Size Change: -265 kB (-15.94%) 👏

Total Size: 1.4 MB

Filename Size Change
dist/929.js 0 B -265 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size Change
dist/103.js 69.9 kB 0 B
dist/151.js 444 kB 0 B
dist/225.js 2.24 kB 0 B
dist/239.js 34.3 kB 0 B
dist/277.js 1.85 kB 0 B
dist/353.js 3.02 kB 0 B
dist/360.js 6.8 kB 0 B
dist/41.js 3.04 kB 0 B
dist/422.js 3.37 kB 0 B
dist/499.js 2.51 kB 0 B
dist/540.js 2.63 kB 0 B
dist/606.js 2.57 kB 0 B
dist/635.js 14.4 kB 0 B
dist/689.js 265 kB 0 B
dist/842.js 114 kB 0 B
dist/979.js 6.87 kB 0 B
dist/993.js 3.09 kB 0 B
dist/main.js 416 kB -59 B (-0.01%)
dist/openmrs-esm-form-engine-lib.js 3.81 kB +1 B (+0.03%)

compressed-size-action

@vasharma05 vasharma05 force-pushed the fix/tooltip-alignment branch from cbf6db6 to 071c102 Compare April 4, 2025 11:30
@vasharma05 vasharma05 changed the title (fix) Change the alignment of the tooltip to right (fix) Make the whole label as tooltip trigger Apr 4, 2025
@vasharma05 vasharma05 force-pushed the fix/tooltip-alignment branch 2 times, most recently from 887fd00 to 46a73c6 Compare April 10, 2025 10:29
hasTooltip: boolean;
}

const FieldLabelContent: React.FC<FieldLabelContentProps> = ({ field, customLabel, hasTooltip }) => {
Copy link
Member

Choose a reason for hiding this comment

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

@vasharma05 Splitting these components feels overkill. Here is a simplified version: https://gist.github.com/samuelmale/daef56444bc7e8ea79c044dc842dec37

@vasharma05 vasharma05 force-pushed the fix/tooltip-alignment branch from 599acc8 to 1d6d093 Compare April 16, 2025 15:34
@vasharma05 vasharma05 force-pushed the fix/tooltip-alignment branch from 1d6d093 to 79a5fb5 Compare April 16, 2025 15:35
Copy link
Member

@samuelmale samuelmale left a comment

Choose a reason for hiding this comment

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

@vasharma05 can we fix the failing tests?

@vasharma05 vasharma05 requested a review from samuelmale April 22, 2025 05:51
@pirupius pirupius requested a review from samuelmale April 29, 2025 08:20
@pirupius pirupius merged commit ea1d5ca into main Apr 29, 2025
7 checks passed
@pirupius pirupius deleted the fix/tooltip-alignment branch April 29, 2025 17:26
@denniskigen denniskigen mentioned this pull request Apr 30, 2025
3 tasks
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.

3 participants