-
Notifications
You must be signed in to change notification settings - Fork 4
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
auro-icon proxy makes it unusable in some situations #138
Comments
This issue has a couple of moving parts with it that include possible updates to the CDN solution for auro-icon as well as supporting updates to Auro Icons for a better developer experience in React. See new issue for automating the generation of React icon components |
Have you tried using the <auro-icon customSvg>
<svg slot="svg" aria-labelledby="pin-trip-filled__desc" class="ico_squareLarge" role="img" viewBox="0 0 24 24" part="svg" style="min-width: var(--auro-size-lg, var(--ds-size-300, 1.5rem)); height: var(--auro-size-lg, var(--ds-size-300, 1.5rem)); fill: currentcolor;"><title></title><desc id="pin-trip-filled__desc">drop pin with circles.</desc><path d="M10.045 3.345a.75.75 0 0 1 .785-.714l.05.003a.75.75 0 0 1-.082 1.498l-.04-.002a.75.75 0 0 1-.713-.785m-1.217.22a.75.75 0 0 1-.357 1l-.034.016a.75.75 0 0 1-.655-1.35l.047-.022a.75.75 0 0 1 .999.357m3.949.186a.75.75 0 0 1 1.012-.318l.045.023a.75.75 0 0 1-.703 1.326l-.035-.019a.75.75 0 0 1-.319-1.012M6.508 5.057a.75.75 0 0 1 .2 1.041l-.01.017a.75.75 0 1 1-1.246-.836l.014-.022a.75.75 0 0 1 1.042-.2m8.577.22a.75.75 0 0 1 1.038.218l.028.044a.75.75 0 0 1-1.264.808l-.02-.032a.75.75 0 0 1 .218-1.038m6.02 7.014c0-2.789-2.44-4.88-4.88-4.88s-4.881 2.091-4.881 4.88q0 2.559 4.11 8.496l.199.285.055.068a.697.697 0 0 0 1.088-.068q4.31-6.16 4.309-8.781m-6.275 0a1.394 1.394 0 1 1 2.789 0 1.394 1.394 0 0 1-2.789 0M4.635 10.704a1.74 1.74 0 1 0 0-3.48 1.74 1.74 0 0 0 0 3.48"></path></svg>
</auro-icon> |
gave it a shot, but just get the penguin |
Followup post pair programming with @ashleybiermannalaska This feature is correctly supported in our current released version of auro-icon and no new work needs to be done here. However, the Seats team does have the issue that an earlier version of auro-icon was been forced on them due to being imported and defined in the document before they loaded their version of auro-icon with the correct feature support. I have worked with Ashley to review how to resolve that problem by doing custom registration creating I am marking this ticket as |
Still pending update from @ashleybiermannalaska re: mobile view functionality. |
This change is understood to work as intended. Closing the ticket. |
Please verify the version of auro-icon you have installed
none now
Please describe the bug
Seats teams has been using the
auro-icon
without realizing it was a proxy, which can lead to CORs issues. for pages not hosted by our seatmap, the icons were not able to be retrieved, and could not be used.Our project uses React, webpack, Typescript, and Jest.
Worked alongside Dale to come to a solution. The solution is to directly use the SVGs for the icons instead of the auro-icon. this is cumbersome and has a setup to complete. below is a list of setup we needed to add, and then another list of possible ways to make this a better dev experience.
Changes required in order to use auro icon svgs outside of our own hosted page:
auro-icon
element, replace with@alaskaairux/icons
@svgr/webpack
to support svgs as ReactComponentsSuggestions to improve dev experience:
Change the proxy situation, and allow for continued easy use of
auro-icon
without the CDN call. Maybe it relies on@alaskaairux/icons
being installed and pulls from there. This way, devs continue to have access to all svgs without having to slog through the setup work to add a single icon. It also lets devs continue to use a BFF layer to determine the icon, without additional client side setup.If not changing the proxy situation:
import { ReactComponent as Boarding } from ...
toimport { Boarding } from ...
import { ReactComponent as PremiumClassLegroom } from "@alaskaairux/icons/dist/icons/in-flight/premium-class-legroom.svg"; import { ReactComponent as Boarding } from "@alaskaairux/icons/dist/icons/in-flight/boarding.svg";
to
import { Boarding, PremiumClassLegroom } from alaskaair/icons/dist/icons;
Reproducing the error on the docsite
None
Expected behavior
auro-icon can be used without cors issues
or
svgs have an easier way to be used in a project
What browsers are you seeing the problem on?
No response
Additional context
This is the PR created when SeatsUI moved from using
auro-icon
to using svgshttps://github.com/Alaska-ECommerce/SeatsUI/pull/593
Exit criteria
The text was updated successfully, but these errors were encountered: