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

Handle flex-expander case in tabs gap #6894

Merged
merged 6 commits into from
Sep 12, 2024
Merged

Handle flex-expander case in tabs gap #6894

merged 6 commits into from
Sep 12, 2024

Conversation

evansjohnson
Copy link
Contributor

See Tabs docs: https://blueprintjs.com/docs/#core/components/tabs - there's currently 40px between the search input and the last tab, because of a double gap on the flex-expander. This was an existing issue before the change from margin-right -> gap.

This PR adds a style targeting the flex-expander with a negative margin to remove the gap added due to the expander component.

@changelog-app
Copy link

changelog-app bot commented Jul 3, 2024

Generate changelog in packages/core/changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Remove extra space added after a TabsExpander component

Check the box to generate changelog(s)

  • Generate changelog entry

@svc-palantir-github
Copy link

Add generated changelog entries

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@svc-palantir-github
Copy link

only vertical

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

// some consumers may have targeted the default margin-right to override it and this
// should wipe out their override and at least reset them to the default gap style
// instead of applying both the gap style and whatever margin-right they have defined
style={{ ...child.props.style, marginRight: 0 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried making this work for the non tab case as well but looks like that will have issues since the style prop is not always applied at the top level, going to back this out

Screenshot 2024-07-03 at 3 41 30 PM Screenshot 2024-07-03 at 3 41 30 PM

@svc-palantir-github
Copy link

Revert "prevent user margin-right style"

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

ggdouglas
ggdouglas previously approved these changes Aug 27, 2024
Copy link
Contributor

@ggdouglas ggdouglas left a comment

Choose a reason for hiding this comment

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

Considering that we're only shrinking the horizontal space here, I feel like this is generally safe.

Co-authored-by: Greg Douglas <gdouglas@palantir.com>
@policy-bot policy-bot bot dismissed ggdouglas’s stale review September 9, 2024 20:15

Invalidated by push of edb75ba

@svc-palantir-github
Copy link

Update packages/core/src/components/tabs/_tabs.scss

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@evansjohnson
Copy link
Contributor Author

going to merge this, I agree it seems like it should be safe - we're only possibly removing 20px space, and only when space has already been added by the flex expander component

@evansjohnson evansjohnson merged commit 0831a39 into develop Sep 12, 2024
13 checks passed
@evansjohnson evansjohnson deleted the evanj/tabs-gap branch September 12, 2024 20: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.

5 participants