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

style: add inter font and apply #6328

Merged
merged 7 commits into from
Apr 10, 2023
Merged

style: add inter font and apply #6328

merged 7 commits into from
Apr 10, 2023

Conversation

hkang1
Copy link
Contributor

@hkang1 hkang1 commented Mar 23, 2023

Description

Update Web UI font from Objektiv Mk3 to Inter variable font.

BEFORE:
Screenshot 2023-04-05 at 3 25 54 PM
Screenshot 2023-04-05 at 3 26 39 PM

AFTER:
Screenshot 2023-04-05 at 3 26 12 PM
Screenshot 2023-04-05 at 3 26 28 PM

Test Plan

  • verify the web UI is using Inter font suite and not the Objektiv Mk3 font suite.

Commentary (optional)

Inter font was developed for Figma use and designed to be highly legible. The font comes in two flavors. One as a suite of fonts with each variation as a separate woff2 file. The second comes in two variable font, regular|roman and italic. The font weights are controlled via CSS @font-face. The browsers that support variable font will use them and as a fallback the family suite is used.

  • A new theme reference of --theme-font-family-var is introduced to provide a reference for CSS to use via the @support { ... } selector. The fallback would still reference --theme-font-family as before.
  • There were two sets of theme variables reference fonts (e.g. --theme-font-family and --font-family). The decision was made to drop the one without the --theme prefix to keep the font family as a part of the theme in case future themes decide to use a different set of fonts.

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

WEB-1042

@hkang1 hkang1 requested a review from alexjdetermined March 23, 2023 17:00
@cla-bot cla-bot bot added the cla-signed label Mar 23, 2023
@netlify
Copy link

netlify bot commented Mar 23, 2023

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit dc3d79b
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6434407e3ef87b00084a43bf
😎 Deploy Preview https://deploy-preview-6328--determined-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ClaireNeveu
Copy link
Contributor

Is there a ticket for this?

@hkang1
Copy link
Contributor Author

hkang1 commented Mar 23, 2023

Is there a ticket for this?

@alexjdetermined, quick go make a ticket!

Senior Alex J just wanted to see what this looks like via netlify preview, not something that is going to land.

@hkang1 hkang1 force-pushed the style/inter-font branch from a93fcb0 to 179027e Compare April 5, 2023 19:56
@hkang1 hkang1 force-pushed the style/inter-font branch 3 times, most recently from e374a00 to 721e2d9 Compare April 5, 2023 21:21
@hkang1 hkang1 requested a review from rb-determined-ai April 6, 2023 21:52
@hkang1 hkang1 marked this pull request as ready for review April 6, 2023 21:53
@hkang1
Copy link
Contributor Author

hkang1 commented Apr 6, 2023

Is there a ticket for this?

Added the corresponding ticket.

@@ -162,7 +162,7 @@ export const LineChart: React.FC<LineChartProps> = ({
return {
axes: [
{
font: '12px "Objektiv Mk3", Arial, Helvetica, sans-serif',
font: '12px Inter, Arial, Helvetica, sans-serif',
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: not a big deal since this is the only component where it's happening right now, but it would be nice to have font (and any other global styles) configured in one place for use in any canvas component, instead of defining it manually for each case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ideally I was hoping to put CSS var directly here, but I don't think it worked properly for me... probably could take another look to make sure I used the right syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, wdy know! the css var worked great here...

@@ -5,7 +5,7 @@
}
}
.row {
height: 60px;
height: 48px;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I guess we're replacing this table anyway, but I think height value isn't doing anything here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the table will be replaced just for exp but yeah probably eventually they will all be replaced?

But doesn't the experiment list table look more compact for you? from 60 to 48

Copy link
Contributor

Choose a reason for hiding this comment

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

it is more compact, i just meant that it's at 49px based on content and reducing it to 48px isn't doing anything

@hkang1 hkang1 assigned hkang1 and unassigned johnkim-det Apr 10, 2023
@hkang1 hkang1 force-pushed the style/inter-font branch from 721e2d9 to 22cfc20 Compare April 10, 2023 16:47
Copy link
Contributor

@rb-determined-ai rb-determined-ai left a comment

Choose a reason for hiding this comment

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

license changes look good to me

@hkang1 hkang1 merged commit 170c960 into master Apr 10, 2023
@hkang1 hkang1 deleted the style/inter-font branch April 10, 2023 19:14
jgongd pushed a commit to jgongd/determined that referenced this pull request Apr 18, 2023
@dannysauer dannysauer added this to the 0.21.2 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants