Skip to content

Fix handling of style property in Tabs component#139

Open
clarasb wants to merge 4 commits intomainfrom
clarasb-135-component_visibility
Open

Fix handling of style property in Tabs component#139
clarasb wants to merge 4 commits intomainfrom
clarasb-135-component_visibility

Conversation

@clarasb
Copy link
Collaborator

@clarasb clarasb commented Feb 11, 2026

This PR:

  • fixes handling of style prop in Tabs component.
  • adds the prop iconPosition to Tabs component
  • extends the demo Panel H to refelct the changes made in this PR.

Example Panel H (chartlets.py/demo/my_extension/my_panel_8.py):

grafik grafik

Closes #135 and #136.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (5d9b673) to head (87c9a41).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #139   +/-   ##
=======================================
  Coverage   92.21%   92.22%           
=======================================
  Files          86       86           
  Lines        1503     1504    +1     
  Branches      231      230    -1     
=======================================
+ Hits         1386     1387    +1     
  Misses         98       98           
  Partials       19       19           
Flag Coverage Δ
backend 100.00% <100.00%> (ø)
frontend 83.88% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@clarasb clarasb marked this pull request as ready for review February 12, 2026 14:28
@clarasb clarasb requested review from b-yogesh and forman and removed request for b-yogesh February 12, 2026 14:28
Copy link
Collaborator

@b-yogesh b-yogesh left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good. Please have a look at my comments.

type: "Tab";
label?: string;
icon?: string;
iconPosition?: "bottom" | "end" | "start" | "top" | undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we have undefined here?
Also, in the API docs https://mui.com/material-ui/api/tab/, the default is set to top. If you change that to undefined, does it affect it in any way?

## Version 0.1.8 (in development)

* Fixed handling of `style` prop in `Tabs` component and added prop
`iconPosition`. (#135)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This PR mentioned two issues, please mention them both here.

@@ -1,5 +1,7 @@
## Version 0.1.8 (in development)

* Added `iconPosition` to `Tabs` Component. (#135)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here as well, please

return (
<MuiTab
key={index}
style={tabState?.style}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we apply the same style to both the Tab button and body, was this a design decision? or does it needs discussion?

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.

Tabs component visibility cannot be controlled consistently for subcomponents

2 participants