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: add control over 'parts' when extending fast foundation components #5832

Closed
yinonov opened this issue Apr 13, 2022 · 4 comments
Closed
Labels
area:fast-foundation Pertains to fast-foundation closed:obsolete No longer valid community:noteworthy An issue or PR of particular interest to the community or planned for an announcement. community:request Issues specifically reported by a member of the community. improvement A non-feature-adding improvement status:under-consideration Issue is being reviewed by the team.

Comments

@yinonov
Copy link
Contributor

yinonov commented Apr 13, 2022

🙋 Feature Request

setting parts on shadowRoot elements makes them exposed for authors to customize (and abuse) easily.
when locking down components to enforce a design system rules is a concern, setting part attributes conflicts with that general intention.

wondering what other design system maintainers feel about that...

🤔 Expected Behavior

consumers of fast foundation components should be able to decide whether parts should be included in the template or not

There are rare cases where part is absolutely required.
So the ideal solution would probably be to opt-in (or out) (during component definition phase) to whichever parts needed

😯 Current Behavior

Parts are enforced in templates unless overriding.

💁 Possible Solution

Consumers of components may query all part attributes from within the component class and remove 'em programmatically, still this is not ideal as it results in dirty redundant solution that should be probably handled architecturally.

I'm not fully keen with how definition of components work but can it be leveraged to

export const myComponent = MyComponent.compose({
    baseName: "my-component",
    template,
    styles,
    parts: {
        base: true,
        control: false
    }
});

🔦 Context

💻 Examples

@yinonov yinonov added the status:triage New Issue - needs triage label Apr 13, 2022
@chrisdholt chrisdholt added improvement A non-feature-adding improvement status:under-consideration Issue is being reviewed by the team. area:fast-foundation Pertains to fast-foundation community:request Issues specifically reported by a member of the community. community:noteworthy An issue or PR of particular interest to the community or planned for an announcement. and removed status:triage New Issue - needs triage labels Apr 13, 2022
@chrisdholt
Copy link
Member

Thanks opening this @yinonov - a key belief some of the core maintainers have held is that design systems are often on a spectrum of customization. Where that customization happens depends on the requirements of a given project; some may value more open approaches and some may want things more locked down. I think this falls into the latter camp which is a gap right now. We have some ideas brewing, but we'll start with an issue here and see if we can gather additional feedback from the community. 👍

@simonxabris
Copy link
Contributor

I agree with @yinonov that the less escape hatches you have the more you're able to enforce consistency within the apps that are consuming the design system and in my opinion part is an escape hatch. Any new features that lets us customise this would be a welcome addition.

@yinonov
Copy link
Contributor Author

yinonov commented Apr 13, 2022

exactly. it puts much trust in authors. which, unfortunately, hasn't been working out for us and the unification objective
But I can honestly say locking down has done wonders

@janechu
Copy link
Collaborator

janechu commented May 29, 2024

With #6955 we are deprecated @microsoft/fast-foundation.

@janechu janechu closed this as completed May 29, 2024
@janechu janechu added the closed:obsolete No longer valid label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation closed:obsolete No longer valid community:noteworthy An issue or PR of particular interest to the community or planned for an announcement. community:request Issues specifically reported by a member of the community. improvement A non-feature-adding improvement status:under-consideration Issue is being reviewed by the team.
Projects
None yet
Development

No branches or pull requests

4 participants