Skip to content

feat: left/right tooltips#3071

Merged
codecademydev merged 84 commits intomainfrom
cass-gm-1094
Jun 10, 2025
Merged

feat: left/right tooltips#3071
codecademydev merged 84 commits intomainfrom
cass-gm-1094

Conversation

@dreamwasp
Copy link
Copy Markdown
Contributor

@dreamwasp dreamwasp commented Apr 24, 2025

Overview

Create left-center + right-center aligned ToolTips + Popovers

PR Checklist

  • Related to designs: Gamut Figma
  • Related to JIRA ticket: GM-1094
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  1. Head to the ToolTip story
  2. See the new left + right aligned inline tooltips
  3. See the new left + right aligned floating tooltips
  4. Spot check the other Tip stories + see they are unchanged
  5. Pull down the branch locally + see that the new Popover types

PR Links and Envs

Repository PR Link PR Env
Monolith Monolith PR Monolith Env
Portal Portal Link Portal Env

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 24, 2025

View your CI Pipeline Execution ↗ for commit c650966.


☁️ Nx Cloud last updated this comment at 2025-06-10 13:26:24 UTC

@dreamwasp dreamwasp marked this pull request as ready for review June 3, 2025 19:54
Copy link
Copy Markdown
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

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

Left some thoughts on things I noticed, but will hold off on a bigger review until the walkthrough!

Copy link
Copy Markdown
Contributor

@aresnik11 aresnik11 left a comment

Choose a reason for hiding this comment

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

Nice!! Mostly confirmed SB stories look amazing

Copy link
Copy Markdown
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

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

LGTM! Great job on introducing a new axis for popovers and tooltips!

I tested against the stories and the available variations + colormode and things look great! Left some comments that aren't blocking :D
🔲⬆️🔲
⬅️🔥➡️
🔲⬇️🔲

color: typeof tooltipBgColor | typeof popoverPrimaryBgColor;
};

export const getBeakBackground = ({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems more like setBeakBgAndRotation to me lol

Comment on lines +133 to +138
const isSml = alignment.includes('sml');
const isAbove = alignment.includes('above');
const isBelow = alignment.includes('below');
const isRight = alignment.includes('right');
const isXCentered = alignment.includes('-center');
const isYCentered = alignment.startsWith('center-');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NOT asking for a refactor!!

But food for thought, I think this can be simplified if you parsed out the alignment using .split("-") into the 1st string and the 2nd (and 3rd string, the 'sml', if present).

And then you can layer on stylings according the the positioning (and make adjustments for 'sml'). This might also involve changing how you're creating the styles tho 🤔

At the moment if statement feels like it's winds through all the different combos but it's a little hard to follow along.

@codecademydev
Copy link
Copy Markdown
Collaborator

📬Published Alpha Packages:

@codecademy/gamut@64.1.0-alpha.c65096.0
@codecademy/gamut-kit@0.6.513-alpha.c65096.0
@codecademy/styleguide@75.1.0-alpha.c65096.0

@codecademydev
Copy link
Copy Markdown
Collaborator

🚀 Styleguide deploy preview ready!

https://6848329614f990a4aa7795dd--gamut-preview.netlify.app

Deploy Logs

@dreamwasp dreamwasp added the Ship It :shipit: Ready 2 ship label Jun 10, 2025
@codecademydev codecademydev merged commit caaba79 into main Jun 10, 2025
21 of 22 checks passed
@codecademydev codecademydev removed the Ship It :shipit: Ready 2 ship label Jun 10, 2025
@codecademydev codecademydev deleted the cass-gm-1094 branch June 10, 2025 14:59
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.

4 participants