Skip to content

Adding Typography components for Headings/Subheadings #16673

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 4 commits into from
Mar 6, 2023

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Mar 4, 2023

Description

Introducing a set of typography components to normalize how we render Headings and Subheadings. This also aims to fix many places where we've used <h2> tags instead of a normal <p> tag, and update most of our uses of <h3> tags to be an <h2>. Many uses of heading tags aren't correctly handling dark mode, so this also addresses that. Lastly, having components for typography related elements allows us to standardize any variations we might want to offer, such as slight color or tracking variations.

I've approached this by creating the following components.

  • <Heading1>
  • <Heading2>
  • <Heading3>
  • <Subheading>

I didn't replace all of the existing uses of plain html heading elements (<h1|2|3|4>), but tried to get most of the ones that were easy to test. Eventually we can refactor remaining tags to use the components as well. Then we can decide if we want to just remove our global styles for headings in the index.css file.

How to test

Most of the changes are found in User and Project settings. Clicking around to the various pages and ensuring headings and subheadings look correct should be a sufficient test.

Release Notes

NONE

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-slow-database
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-bmh-response-updates.1 because the annotations in the pull request description changed
(with .werft/ from main)

@selfcontained selfcontained changed the title Bmh/response-updates Adding Typography components for Headings/Subheadings Mar 4, 2023
@@ -50,6 +50,9 @@ module.exports = {
// TODO(andreafalzetti): remove custom ide-modal class once we implement https://github.com/gitpod-io/gitpod/issues/13116
51.5: "51.5rem",
},
lineHeight: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding this allows us to use a leading-64 class on our h1 so that it has the right line-height.

@selfcontained selfcontained marked this pull request as ready for review March 4, 2023 01:02
@selfcontained selfcontained requested a review from a team March 4, 2023 01:02
@selfcontained selfcontained requested a review from gtsiolis as a code owner March 4, 2023 01:02
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 4, 2023
@@ -138,7 +139,7 @@ export function Login() {

return (
<div id="login-container" className="z-50 flex w-screen h-screen">
{showWelcome ? (
{!showWelcome ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

left over from debugging?

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 wow, yah. Thanks for catching this 🙇

@svenefftinge
Copy link
Contributor

svenefftinge commented Mar 6, 2023

/werft run

👍 started the job as gitpod-build-bmh-response-updates.2
(with .werft/ from main)

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

LGTM

/hold for the inverted showWelcomeflag

@selfcontained selfcontained force-pushed the bmh/response-updates branch from 59b8053 to b2fe9b9 Compare March 6, 2023 18:47
@selfcontained
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 294aa69 into main Mar 6, 2023
@roboquat roboquat deleted the bmh/response-updates branch March 6, 2023 19:31
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Mar 7, 2023
gtsiolis added a commit that referenced this pull request Apr 3, 2023
Minor spacing change to the delete account button under `/account`. Seems like a small side effect from the typography components added in #16673.

https://github.com/gitpod-io/gitpod/blob/2d4f94634ce3178b224e62ac582dc005fc636f5a/components/dashboard/src/user-settings/Account.tsx#L93-L97

Cc @easyCZ because [relevant discussion](https://gitpod.slack.com/archives/C02EN94AEPL/p1680514715896819) (internal)

Cc @selfcontained because #16673
@gtsiolis gtsiolis mentioned this pull request Apr 3, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/XXL team: webapp Issue belongs to the WebApp team
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

3 participants