Skip to content

Conversation

@kiley-mitti
Copy link
Contributor

Brief Description

I've added new parts to aux-global-status-bar to open up more styling options for developers.

JIRA Link

ASTRO-4884

Related Issue

Discussion #993

General Notes

Motivation and Context

The GSB's default slot is difficult to center on the page. Since the GSB uses a flex-box model, if the right-slot is less wide than the left-slot + App container (as it most often is) then the content in the default slot will center on its surrounding container but NOT on the page. See Example

Issues and Limitations

Without adding a bunch of markup, this is a difficult thing to fix within the component itself. Every section of the GSB is slottable and we have no way to really know what developers will choose to put in each slot.

To that end, I added two parts: one on the container that wraps the app-data section and another on the container that wraps the default slot.

With these two extra style-able section, it should be significantly less challenging to place the default slot content where one would want it.

I don't LOVE the name I've given to the default slot wrapper part and would be very open to suggestion.

There is a centering proof-of-concept on center.html in the GSB test folder. This should be removed before we merge.

Types of changes

  • Bug fix
  • New feature
  • Breaking change

Checklist

  • This PR changes a Storybook story.
  • I have added tests to cover my changes.
  • Regressions are passing and/or failures are documented
  • Changes have been checked in evergreen browsers

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2022

🦋 Changeset detected

Latest commit: 7f6faad

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Nov 21, 2022

Deploy Preview for astro-preview ready!

Name Link
🔨 Latest commit 7f6faad
🔍 Latest deploy log https://app.netlify.com/sites/astro-preview/deploys/637d217585eca100089ff1b8
😎 Deploy Preview https://deploy-preview-937--astro-preview.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.

Copy link
Contributor

@markacianfrani markacianfrani left a comment

Choose a reason for hiding this comment

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

good stuff! I think this raises a larger issue with the component itself and we should reevaluate the value add of gsb as a whole. devs shouldnt have to do this, but as a short term solution, we should at least offer the ability to do so.

@kiley-mitti kiley-mitti merged commit b220745 into main Nov 22, 2022
@kiley-mitti kiley-mitti deleted the km-4884-gsb-add-parts branch November 22, 2022 19:42
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