-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
add anchor as a new component to support anchor-button scenario #27395
add anchor as a new component to support anchor-button scenario #27395
Conversation
📊 Bundle size report🤖 This report was generated against 37195a34b36538ab0cc7c765824691bab796502e |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 37195a34b36538ab0cc7c765824691bab796502e (build) |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d3f85c0:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no conflicting namespace. "Anchor" isn't a construct in Fluent components and "link" conveys a different semantic meaning.
So we will have fluent-anchor
(which looks like a button) and intrinsic a
. If we ever add fluent-link
my head will explode.
I guess “link” is a legit instance and appearance we need to adopt isn’t it? I’m open to “anchor-button” but also, yuck! |
I would understand the |
Given we have |
e425bb8
to
de77904
Compare
change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
Outdated
Show resolved
Hide resolved
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
…27395) * add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
…27395) * add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
…27395) * add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
* add anchor as a new component to support anchor-button scenario * dont forget managing anchor disabled * update naming to anchor button * Update change/@fluentui-web-components-b7e6d7ad-6aac-4ccb-b7ee-97424d76f9a2.json
Naming
For a variety of reasons, supporting two separate semantic elements within the ShadowDOM of a web component is less than ideal. With that, we need to find an approach to support scenarios for elements which functionally and semantically are anchors, but appear like a button.
From a verbosity standpoint, "anchor button" is the semantic that we tend to use to describe these. Fluent UI React v9 utilizes "as" to shorthand this assignment. Given this needs to be a separate HTML element, I'm proposing a shorter name than
anchor-button
and utilizing a class and tag name of simply<fluent-anchor>
. A few key reasons for this:Overall, it seems reasonable to simply go with the shorter name as it maintains an existing approach, there are no semantic conflicts in Fluent, and it's just plain easier and shorter to write.
Related Issue(s)