AlaskaAirlines / auro

Document repository to support all Auro custom element repos.
https://auro.alaskaair.com
16 stars 4 forks source link

Amenity #232

Closed blackfalcon closed 3 years ago

blackfalcon commented 3 years ago

Component Audit

The scope of this issue is to track the full progress of the auro-amenity component.

Amenitie

The scope of this element is to leverage a feature from auro-icon to display an icon with a label and create a custom element that can be easily rendered using data.

<auro-icon label category="in-flight" name="wifi">Wi-Fi</auro-icon>

Process

This issue is to remain open until all areas of the specification and all assets have been delivered to stakeholders and user groups.

As new issues are created that are children of this Audit item, please be sure to reference this Audit item in that issue.

As assets are delivered, it is required that the labels associated with this Audit issue are updated to reflect status. Labels are as follows:

This Audit issue will remain open until all assets have been delivered be it V0 or ADS compliment.

blackfalcon commented 3 years ago

Conclusion: the scope of the component is to automate the generation of an amenities tab-bar

Feature: icon w/label, icon w/o label, popover or not to popover Use all existing auro elements to pull this together.

First pass, this is an individual component that will create a single amenitie. Consultl with @gusnaughton about specific API

blackfalcon commented 3 years ago

@gusnaughton the more I think about this one, the more I have reservations about this. The proposed idea is to have a single component whereas a single code could be used to generate the placement of the icon and text. E.g. instead of having to do

<auro-icon label category="in-flight" name="wifi">Wi-Fi</auro-icon>

the proposal is something like

<auro-amenity iata="13"></auro-amenity>

If my assumption is correct, there are some things I am not liking about this proposal. One being the lack of actual content in the element breaks our SEO model that many are using when not in the context you want to use this element.

Next, does this really need to be a new custom element given the updates to auro-icon?

Counter proposal

There are two ways I see addressing this.

  1. There is a local function that will churn through the iata data and produce auro-icon elements with the icon and string in the slot
  2. This is a new feature added to auro-icon with the disclaimer that this may break SEO as this will be content generated on the fly versus delivered with the HTML in the slot
blackfalcon commented 3 years ago

This work was mostly delivered with an update to auro-icon https://github.com/AlaskaAirlines/auro-icon/commit/20b5cd3f771403c20debba4f4f1035b9515e1afb