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

feat(ui-shell): make company in Header slottable #1764

Merged
merged 7 commits into from
Jul 13, 2023

Conversation

p0lish
Copy link
Contributor

@p0lish p0lish commented Jul 11, 2023

I've noticed that the ui shell has a little glitch during load in our app.

image

The  disappearing after load but it causes a glitch.

The root cause is an   character in the company text span.
Maybe somebody else faced with this glitch too, so I created a small improvement for that.

@brunnerh
Copy link
Contributor

That just looks like an encoding issue, did you set a/the correct charset in the content-type header or a meta tag?

@p0lish
Copy link
Contributor Author

p0lish commented Jul 11, 2023

Yes, charset (utf-8) is in the meta tag.
Additional info, we are using ssr for svelte.
In my opinion a css rule is better than an nbsp char.

Copy link
Collaborator

@metonym metonym left a comment

Choose a reason for hiding this comment

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

WDYT about making the company prop slottable so the end user can override this behavior?

{#if company || $$slots.company}
  <span class:bx--header__name--prefix="{true}"><slot name="company">{company}&nbsp;</slot></span>
{/if}

@p0lish
Copy link
Contributor Author

p0lish commented Jul 12, 2023

WDYT about making the company prop slottable so the end user can override this behavior?

{#if company || $$slots.company}
  <span class:bx--header__name--prefix="{true}"><slot name="company">{company}&nbsp;</slot></span>
{/if}

Hey, I think its a good idea. Thanks.

@p0lish p0lish requested a review from metonym July 12, 2023 10:57
src/UIShell/Header.svelte Outdated Show resolved Hide resolved
@p0lish p0lish requested review from metonym and brunnerh July 13, 2023 13:43
@metonym metonym changed the title remove nbsp that can cause glitch on load feat(ui-shell): make company in Header slottable Jul 13, 2023
@metonym metonym merged commit 9b3f014 into carbon-design-system:master Jul 13, 2023
2 checks passed
@brunnerh
Copy link
Contributor

Ahhh, the doc fixes should of course have been made directly in Header.svelte, they got reverted by the docs re-build.

@metonym
Copy link
Collaborator

metonym commented Jul 13, 2023

@brunnerh Nice catch – I can add that back in.

@metonym
Copy link
Collaborator

metonym commented Jul 13, 2023

Released in v0.77.0

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.

None yet

3 participants