Giter Site home page Giter Site logo

getjobber / atlantis Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 30.0 123.65 MB

πŸ”± Atlantis

Home Page: https://atlantis.getjobber.com

License: MIT License

JavaScript 3.15% TypeScript 85.82% CSS 7.50% Shell 0.06% Objective-C 0.03% Swift 0.19% Ruby 0.07% MDX 3.18%
component-library

atlantis's People

Contributors

adambobadam avatar agglasaur avatar bdfranck avatar chprado avatar chris-at-jobber avatar crgec avatar darryltec avatar dependabot[bot] avatar dlrussel avatar dmcroriegit avatar eddysims avatar gregb-jobber avatar gregorijobber avatar hosseintalebi avatar jcw- avatar jeffmarvin avatar jklotz1 avatar kingstonfung avatar linds14sr20det avatar mattander avatar michaelparadis avatar rebecca-li avatar rodrigoeidelvein avatar scotttjob avatar seanhealy avatar taylorvnoj avatar tjkruitbosch avatar walter-harriman-bot avatar whereyoubinns avatar zakaryh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atlantis's Issues

README: fix broken link to contribution guidelines

Note: this only happens when clicking from github. https://atlantis.getjobber.com/ works fine.
Clicking README hyperlink to contribution guidelines results in 404 not found.

Expected URL: https://github.com/GetJobber/atlantis/blob/master/docs/CONTRIBUTING.md
Actual URL (404): https://github.com/GetJobber/atlantis/blob/master/CONTRIBUTING.md

Fix

add docs/ to the link on line 164
from: [contribution guidelines](/CONTRIBUTING.md) to learn how.
to: [contribution guidelines](/docs/CONTRIBUTING.md) to learn how.
edit - on second thought, doing this might break the site link.

GitHub supports relative links in README files.
As long as Gatsby markdown parser is able to remove the . this would still work on the docs site and GitHub.

add ./ to the link on line 164
from: /CONTRIBUTING.md
to: ./CONTRIBUTING.md

Add CI Integration

At the very least we should make sure CI fails for

  • tests
  • linting rules

RadioGroup is missing `role` and `aria-labelledby` attributes

The RadioGroup has a div that wraps all of the RadioOptions within. This div has a role of radiogroup so that assistive technology can better identify it

The RadioGroup should have an aria-label, aria-labelledby relationship, or a label, so that the group makes sense.

Add a component overview page

Developers unfamiliar with Atlantis can have a hard time finding components that suit their needs, and the search bar only provides limited information. Could we implement a component overview page so that small previews of components could be seen?

An example of this can be seen on Ant Design
image

Chore: Add automation for commit messages

While contributing to the code, I discovered that husky runs linting and pre-checks but post that, the developer has to write the commit message on his/her own.

Moreover, it is when raising a PR that someone comes to know about we follow conventional commits πŸ˜„. S/he then needs to read the scope and pattern and then frame a message.

Proposal:

I have used an interesting npm package that helps automate the commit message creation process at the terminal. Its called cz-conventional-changelog

This runs post husky checks and gives an interactive user interface to the developer to frame his/her commit message in a very similar fashion as we tell in the PR description guidelines.

I tried it below in this repo as well with the defaults and it seems to work well πŸ˜ƒ.

image

Value add:

  1. Will automate commit message creation
  2. Will bring in consistency among all commit messages in the repo πŸ™‚

Let me know, if this sounds like something to be explored or if something hidden might be present which I am not aware of. I Will be more than happy to discuss πŸ˜ƒ. Thanks!!

Make Tabs Accessible

Related Components:

Tabs have no focus states or defined hierarchy. Content within tabs cant be accessed until going through all tabs. They should use different navigation (arrows vs tabs).

Elements with the role tab must either be a child of an element with the tablist role, or have their id part of the aria-owns property of a tablist.

Add role="tablist" aria-label="Tab group name"` to the Tabs element.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role

There should also be a role of tabpanel to go with the role of tab that is on the buttons. A labelledby attribute should also point out which tab is associated with what tabbed content.

Component to visually truncate content

The goal of this issue is to discuss the proposal process and discuss the proposed component. Please start your comments with [META] or [COMPONENT] depending on what you're commenting on. Keep each comment on that particular topic.

A few example comments.

Good

[META]
I think we should submit the readme as a PR instead of discussing it as an issue

Good

[COMPONENT]
Should we have a isCollapsed property to decide if this starts off as collapsed or not.

Bad

[COMPONENT]
I don't like Collapse as the name of the component. Also do we need a Props Table section?

(It comments on both the component and process)


Proposed component documentation:


.../collapse/README.md

Collapse

The Collapse component will collapse content to a specified maximum height; when interacted with that content will expand to its full dimensions.

Design Patterns

The goal of the Collapse component is to hide away secondary or supporting information that is not immediately necessary for the current action or goal. It allows the user to easily expand that content when and if it becomes relevant.

It should only be used to hide away context if there's a good reason to believe it will not be relevant in the majority of cases

Usage

Section to be replaced with an interactive playground when compiled/served.
collapse element

<Collapse collapsedHeight="2 em">
  <ul class="list">
    <!-- ... Content of the list that will be collapsed -->
  </ul>
</Collapse> 

Props Table

name type default description
collapsedHeight string '0em' The height of the component when it is collapsed
children node null The node that will be collapsed

Playground examples take up too much vertical space

As a consumer of Atlantis docs, I want to be able to focus on the right content in examples so that I can absorb the right information.

Pain point

Currently our Playground takes up a ton of vertical space with the code sandbox. This is fine when the intent is to highlight technical patterns, but for design usage examples we end up with more visual space allocated to code examples than the guidelines and visual examples themselves. It makes documentation for relatively simple components like Avatar and Emphasis seem overwhelming.

Potential solution

Add a prop to Playground that defaults to closed/minimized, with an option for the user to expand. Allow for code-specific Playgrounds to be set to "open" by default if needed.

Examples

image
image
image
image

Implement navigation/side drawer component

There are many cases where we'd need to display a drawer like component similar to ones present in Atlantis:

image

Could we implement something like this:

Prop Type Required
activator (Similar to menu component) React Component true
direction "left", "right", "top", "bottom" true
children React Children true
open boolean false
onDismissRequest (): void false
onOpenRequest (): void false
const [isOpen, setIsOpen] = useState(false);

return (
  <SideDrawer activator={<Button />} direction="left" open={isOpen} onOpenRequest={handleOpen} onDismissRequest={handleDismiss}>
    <h1>I am content inside the drawer</h1>
  <SideDrawer />
)

function handleOpen() {
  setIsOpen(true);
}

function handleDismiss() {
  setIsOpen(false);
}

on dismiss request would trigger when:

  • dismiss button clicked
  • drawer swiped away
  • clicked on area outside of dismiss button
  • escape key is pressed

The drawer would overlap content and be placed on-top and would slide in based on the direction.

Also would be good to have accessibility considered.

When on a mobile like/sized device, the drawer could take the entire page?

Define pattern for breadcrumbs/history in `Page`

A few one-off instances of "back button" breadcrumbs have been used alongside Page - a good indicator that it's time to incorporate this mechanism into the component itself, so end users can just use the pattern without having to solve it themselves.

An initial idea explored in a since-closed exploratory PR was to add a single small tertiary button that would simply jump the user up one level in the hierarchy of the application. For example, if you were looking at something like...

settings/notifications

the Back button would return you to

settings.

image

Outstanding Questions

Some other considerations that we would want to resolve (thanks @joelwarrington-jobber!) are:

Multi-level breadcrumbs

If multi-level breadcrumbs were to be a possibility, we could make it so that the breadcrumb type is an array, if the length is 1, use the button style and then some other type of style for multiple?

Additional properties

For added flexibility, would we be able to have 2 additional properties of a breadcrumb?

interface breadcrumb {
  label: string;
  /* Default = "../" */
  url?: string;
  onClick?(): void;
}

If the onClick property is passed, the url is ignored

History vs hierarchy

Do we need to account for the user's X recently-visited views in the breadcrumbs, rather than the application hierarchy? Is that the responsibility of a breadcrumb? E.g. in the above use case of being on a specific settings view...

History could look something like:

home / schedule / invoices ➑️ Notifications Settings (maybe there's a prompt on that view to adjust your invoicing notifications)

Hierarchy would look like:

settings ➑️ Notifications Settings

Does this need to be something that Page is even responsible for? (Could/should end-users configure Page to their needs?)

Requiring <tbody> tag in <Table> ?

A great mention of accessibility when dealing with <Table> component in #763

I was wondering if we should update the schematics of the <Table> component to make <Body> as a required children?

Adjust padding on buttons with icons relative to size

Related Components:

Currently our buttons have different padding based on what size prop is being used. (Small 8px, Base 12px, Large 16px).

However, one an icon prop is introduced, the padding defaults to 16px regardless of size. The padding should stay the same according to its size.

Small button with 8px padding
image

Padding changes to 16px when icon is introduced
image

Base button with 12px padding
image

Padding changes to 16px when an icon is introduced
INCLUDE IMAGE
image

<Tabs> Component to allow props for default opened tab

Component in question:
https://atlantis.getjobber.com/components/tabs

Proposing enhancement(s):
Allowing a props (eg: selectedTab) to be used for selected the default opened Tab

<Tabs selectedTab={1}>
  <Tab label="Eggs"></Tab>
  <Tab label="Cheese"></Tab> {*/ This will be the opened tab by default */}
</Tabs>

Use Case and Reasoning:
If we want to restore the state for the <Tabs> component, right now we couldn't preselect a <Tab> and bring the user back to the correct context.

More specifically, let's say we use <Tabs> inside of a <Modal> component and if the user comes back to either continue their workflow, or edit some information, we would like to bring them back to the exact view with pre-populated information, allowing them to resume their workflows.

Make it easier to cycle through props

Most of our components have fairly limited props, where it's not that hard to edit data in the Playground and see the results.

For components like Icon, however, there are so many possible values for name that must be matched exactly for the prop to work, that the end user of the docs has to scroll through the entire page to search for the right icon.

In addition, cycling through color options is tedious.

And finally, for less-technical users like designers and PMs, it may be daunting to work in the Playground's editor.

Is there a solution to make it easier for consumers of our docs to explore the the visual effects of typed properties on a component?

Tabs: Make tabs navigable by arrow keys and remove tab navigation

The Tab component's accessibility can be improved to use expected keyboard behaviour.

Unlike a same-page link, a tab does not move the user to the associated section/panel of content. It just reveals the content visually. This is advantageous to sighted users (including sighted screen reader users) who wish to flit between different sections without having to wade back up the page each time they want to choose a new one.

This comes with an unfortunate side effect: If the user wishes to move to a section by keyboard and interact with its internal content, they have to step through any tabs to the right of the current tab, which are in focus order.

This problem is solved by delegating tab selection to arrow keys. The user is able to select and activate tabs using the arrow keys, while the Tab key is preserved for focusing contents within and below the active tab panel. To put it another way: Tab is not for tabs, which I concede is a bit confusing. I wish the key and the control had different names, but alas.

It's equally important that pressing Shift + Tab returns the user to the selected tab. This is all possible by giving each tab but the selected tab tabindex="-1", which removes the inactive tabs from focus order but allows focus via a script. In the following example, the second tab is the selected tab, as denoted by the aria-selected state being set to true.

Expected Behaviour

  • While focused on the tab selector, arrow keys which navigate between the sections:
  • While focused on the tab selector, tabbing will focus on the content of the tab
  • While focused on the content of a tab, tabbing will focus on the tab selector

Modal should receive focus when opened

Related Components:

When a modal is opened, you still have to tab through all the content of the page to get to it. Tab and Shift + Tab should not focus outside of the modal. When a dialog opens, focus moves to an element inside the dialog.

https://www.w3.org/WAI/WCAG21/quickref/?showtechniques=111%2C122%2C131%2C132%2C133%2C141%2C143%2C144%2C146%2C148%2C1410%2C1411%2C1412%2C1413%2C211%2C212%2C223%2C224%2C225%2C226%2C241%2C242%2C243#focus-order

Add password strength component to display the strength of a users password

Have implemented a hook to determine the strength of a password, but a component would be great to have which displays this information in a user friendly way.

  • Should have a way to add this to a password input easily (displaying below the input)
  • Should have a way to validate the password input using the password strength from the hook and providing options to enable/disable or set minimum validations (like it needs to be a score > 100 for example)

Menu: Esc key should close the menu

The Esc key does not work as advertised (VoiceOver, for example, understands that Menu is a menu and reads β€œpress the Esc key to close”, but we do not offer this functionality). This means that to close the menu, the user must ensure they have tabbed to the button and then hit return/space to close.

Investigate drawer accessibility

I noticed that the drawer component is only visually hidden when not open, is this intended, should there also be something hiding it with an aria attribute?

Noticed this when working on #709

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.