westpacgel / gel Goto Github PK
View Code? Open in Web Editor NEWThe Design System and supporting website for Westpac GEL
Home Page: https://westpacgel.netlify.com/
License: GNU General Public License v3.0
The Design System and supporting website for Westpac GEL
Home Page: https://westpacgel.netlify.com/
License: GNU General Public License v3.0
InfoIcon
) for the Alert, since 90% of our Alerts are info alerts. The implementation allows for a different icon to be configured (icon={HouseIcon}
) or removed completely (icon={null}
). Is that the right approach?abbr
or span
tag? Currently using span tag since abbr
has a border bottom styling on it from core that has a higher specificity that I can't override.<abbr />
element on text. Should take a Tag prop and not reset the bottom border (thats default styling of abbr)Note: We're discussing whether this component is necessary. My guess, we'll deprecate it.
isKeyboardUser
mode via UserModeContext
from Corearia-hidden
toggle textState management: Component implemented using standard CSS to style 'checked' state. Emotion is not using the checked prop to render styling. This CSS approach was taken to assist with future legacy support features.
Auto-generate form element IDs?
Should disabled state use a not-allowed
cursor (as per GUI2.0)? What's best practise here?
When bolt new
ing a multi-word component name the task needs to remove the dash and pascal case each of the words when it replaces the template’s _COMPONENT_NAME_
placeholder and sets a file name.
e.g. button-group
==> ButtonGroup
etc
This was part of Button (along with Button-Group)
Is this the best approach?
Is cloneElement approach, adding marginLeft via style
attribute approach the best? Append to emotion css object rather than using style
attribute?
Make generic to all inline input elements (e.g. TextInput)?
color
, backgroundColor
and borderColor
styling for the different states of a Label (default and :hover). Is this the best approach? Do we need this level of granularity with tokens?COLORS.text
for text color, other brands use white. This will be a thing throughout a number of components. The default/foreground colour mapping we used to have solved this. How do we proceed?type="button"
if Tag prop is 'button' (as per <Button />
)Table component currently only provides the parent wrapping. Row and cell (children) elements are composed with standard html elements. Are there any benefits in abstracting these standard html elements into React components?
Responsive table (wrapper) element enabled via prop. Maybe this should be the default? noResponsive
prop to disable?
Table wrapper class table-responsive
doesn't feel right. Used by Panel component styling; responsive table styling reset when placed inside Panel.
.table-highlight
class doesn't feel very react-esque
TableWrapper approach? Should it be in the Table.js file or moved to a styled.js or TableWrapper.js (note: it's not exported)
Table can be composed within Panel. A .table-responsive
className is rendered in case Panel composes a responsive Table (as it requires some style tweaks). Is there another way, without the className?
How else can we do the .table-highlight
on cells/rows?
Do we need to check proptypes for a wrapper component that's not exported?
Rethink the sidebar. Ideally off-canvas for XS so we have an environment more aligned with the 'real world'.
Example environment should really utilise the Template component
How is the <head>
tags etc set up. Re meta tags (e.g. responsive viewport meta tag)... is this a concern of the GEL app at all, or the responsibility of the developer to implement? How do we handle this in the example environment.
Example environment's brand switcher uses a label wrapped radio to manage state. Labels aren't focusable in most browsers so we cant style keyboard focus for these 'buttons'. Suggest we use buttons, much like our ButtonGroup component.
Should we auto-generate form element IDs?
Should we always pass our Emotion CSS objects through facepaint mq()
even if the passed values don't include array values? This would ensure if a token is updated to use an array value it would style responsively as expected. Otherwise our component(s) would have to be updated, bumped and re-published to support the token update
Packages added via bolt/yarn add ...
are making package.json fail CI (due to formatting)
We should typecheck every component's props, whether its a simple style component (in src/styled.js
) or a child component that receives props from a parent. Check all.
We should use HTML elements (e.g. checkbox/radio) and CSS selectors (e.g. :checked
) to handle the styling of component state. e.g. Checkboxes, radios, switches etc. This will help us power our legacy (non-react) version.
ArrowRightIcon
once Icon can support thatCurrently setting button's borderRadius and border styling with CSS. Consider doing this programmatically, iterating children and applying borders as needed? Similar to InputGroup question.
We should probably limit the button appearance options. Do we even allow other appearances or is hero appearance it?
Had a thought. This could really easily be merged into the FormCheck component; provided via prop type="button" (adding to radio and checkbox types). Thoughts? @simonswiss @dominikwilkowski
children: PropTypes.arrayOf(
PropTypes.shape({
type: PropTypes.oneOf([ListItem]),
})
)
Perhaps we could actually build the FormPodIndicator in a way that can be toggled on/off and the icon can rotate?
Is the slots approach the best way? (see FormPodFooter and FormPodActions)
Best way to provide FormPodContactList (passing data to items prop)?
The form package provides the following components...
Related form components...
size
, spacing
and inline
values consumed by the numerous form package components (and the separate TextInput component)Styling children: Is the cloneElement() approach the best way to style Panel's children (i.e. PanelHeader, PanelBody & PanelFooter) when access to a parent prop is required? We could add a className on the child components and select them via child selector in emotion, or use the styled component approach to target the child component (see https://emotion.sh/docs/styled#targeting-another-emotion-component)?
Do we need to export TableHeader and TableFooter components? Can we just take props for the header title and footer text?
Table wrapper class .table-responsive
doesn't feel right. Panel refers to this selector.
How do we feel about having GUI2.0's logos and symbols merged into this one component?
Is ‘Symbol’ the best name for this component?
As with Icon (#48)... is aria-label
supported well enough by screen readers? Intopia have previously told us to use ‘sr-only’ technique for alt text
I've stored the multi-brand logo's SVG code as strings in a new SYMBOL token. To render this in the multi-brand components (LogoLarge & LogoSmall) I've used dangerouslySetInnerHTML
on a svg group <g>
tag, since that's the only way I could work out how to do it. Keen to learn the right way 🤔
After some thinking (I sometimes do this when running or in the shower)... perhaps the resize feature (width
and height
props) is something that Symbol should not be concerned with. We allow sizing of the Icon component via size prop, but that's because we mandate a set of sizes. The sizing of Symbols can be done externally I now reckon.
The following things need a Knights Of The Round Table naming things discussion
Suggest changing this concept to ‘overrides’ as this is the term devs at Westpac use to refer to when they add styling/functionality on top of GEL components to make them look/behave differently than intended. We don't recommend doing this and devs know to avoid it, so providing a graceful and considered way to handle this will impress.
Calling the feature something familiar will help promote its use.
Suggest renaming this component something more specific to its use... that being a wrapper to provide document typography styling. How about TextBlock
, Text
or Type
?
Perhaps the @westpac/body
package could be renamed @westpac/typography
and along with the text wrapper component above, it also exports component versions of other type related elements such as a <Lead />
and <LinkText />
?
This component is exported by @westpac/text-input
and renders a text input. It sits alongside Select
and Textarea
. Suggest renaming to TextInput
so it's clear the component renders an input element.
@font-face
(webfont) declarationsisKeyboardUser
mode using react state management, provided via Context by Form component Breakpoints: Do we really need to be specifying a xs: 576
breakpoint? What is that even? Isn't XS anything below the (min-width: 768px)
breakpoint? Note: This has been removed
How to include our webfonts files in our development environment?
Best way to provide 'screen reader only' functionality? Does this utility functionality just become a component in its own right? 🤔_Note: This has been moved to the accessibility-helpers
package as the SrOnly
component_
Do we still need to differentiate between keyboard user navigation and mouse navigation. We are customising the focus styling, so will see keyboard outline styling appear on all UI controls (inputs, buttons, links etc). GUI2.0 uses .is-keyboarduser
on the body to handle this. Note: isKeyboardUser
mode has been implemented via Context provided by Form component
isKeyboardUser mode has been implemented using React state management. Should isKeyboardUser mode be managed in code via state or via body class (as per GUI2.0)? Both? How will this map across into the legacy version?
not-allowed
cursor as per GUI2.0? What's best practise here?role="tooltip"
on the popover bubblearia-describedby="{ID}"
on button and id="{ID}"
on popover bubbleDefault popover
⛔️ Click page to close
Dismissible popover
☑️ Press Esc to close
What is the expected usage of tokens?
Color: Maybe this dependency should somehow live in Core?
Color: To save lines... we could create a tint(color, amount)
function?
Inline button ButtonWrap
component? Make generic to wrap all inline inputs (incl. TextInput)? Append marginLeft to child elements individually?
Are button dropdowns required?
Our approach with this has been to maximise the use of tokens; but since Button is quite complex, it can take numerous prop options (incl. appearance
and soft
) plus requiring :hover and :active state styling, it has made for a rather verbose token structure. Verbose tokens yes, but much simpler component code (and the power of publicly exposed button styling). Thoughts?
Icons: Buttons take Icon
children. How are we best to style these? I've taken a leaf from Atlaskit's book, using iconAfter/iconBefore props. Simple enough.
Do we actually need to be able to take a tag="input"
prop? We could simplify the codebase a little if this requirement was dropped and Buttons are either <button>
, <a>
or <span>
(but not <input>
). Nb. <input>
elements add code complexity because they can't take children elements (they use a value
attribute). Worth mentioning... they can't take Icons.
Active styling is now leaning on pointer-events: none
to handle styling for active plus hover (ie. we don't want hover styling applied on an active button). Are there any issues with this? Or should our solution handle this without use of this property (ie. using a :hover:not(:active)
styling).
Removed .disabled
styling (via class name). Disabled styling only provided via disabled
attribute. You can no longer disable a <a>
button (<a>
can't take a disabled
attribute); but really probably shouldn't be doing this anyway as it's bad practice to disable links.
Would it be more conventional to name these components 'Icon' followed by the name ie. IconHouse
, IconInfo
, IconAlert
(rather than HouseIcon
, InfoIcon
, AlertIcon
)
As with Symbol (#64)... is aria-label
supported well enough by screen readers? Intopia have previously told us to use sr-only for alt text
COLORS.text
for text color, other brands use white. This will be a thing throughout a number of components. The default/foreground colour mapping we used to have solved this. How do we proceed?aria-label
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.