GithubHelp home page GithubHelp logo

patternfly / patternfly-design Goto Github PK

View Code? Open in Web Editor NEW
113.0 52.0 105.0 149.18 MB

Use this repo to file all new feature or design change requests for the PatternFly project

Shell 6.89% JavaScript 14.53% HTML 62.76% Ruby 1.30% Handlebars 14.52%
ui ux uxd patternfly design-patterns design ux-ui ui-components ui-design ux-design

patternfly-design's Introduction

PatternFly 5

Install

When you install PatternFly 5, the package includes:

  • a single file for the entire compiled library: node_modules/@patternfly/patternfly/patternfly.css
  • individual files with each component compiled separately: node_modules/@patternfly/patternfly/<ComponentName>/styles.css
  • a single file for the entire library's source (SASS): node_modules/@patternfly/patternfly/patternfly.scss
  • individual files for each component's source (SASS): node_modules/@patternfly/patternfly/<ComponentName>/styles.scss

Any of the files above are meant for use in consuming the library. The recommended consumption approach will vary from project to project.

Development

PatternFly 5 Development requires Node v16.0.0 or greater

To setup the PatternFly 5 development environment:

  • clone the project
  • run yarn install from the project root
  • run yarn start
  • open your browser to http://localhost:8001

After working on your contribution, check for accessibility violations.

Create components, layouts...

To create source file scaffolding for a new component, layout, utility, or demo, run the NPM script:

node generate <CamelName>

Below are the full options for this script:

Options:
  -f, --folder <folder>  Source folder (components, demos, layouts, or utilities) (default: "components")

Examples

To create a "Test component" component (.pf-v5-c-test-component), run:

node generate TestComponent

To create a "Test layout" layout (.pf-l-test-layout), run:

node generate TestLayout -f layouts

To create 3 new demos named "Test demo", "Test demo 2", and "Test demo 3", run:

node generate TestDemo TestDemo2 TestDemo3 -f demos

Update screenshots

When making visual changes to a full page example, new example preview screenshots must be generated. To update the screenshots:

  • open a terminal and run yarn build && yarn serve
  • in another terminal, run yarn screenshots

Guidelines for CSS development

  • For issues created in Core that will affect a component in PF-React, a follow up issue must be created in PF-React once the Pull Request is merged. The issue should include the Core PR #, the Core Release, a link to the component in https://core-staging.patternfly.org, and information detailing the change.
  • If global variables are modified in Core, a React issue should be opened to address this.
  • CSS developers should ensure that animation is well documented and communicated to the respective React developer.
  • Once the component/enhancement is complete it should receive sign off from a visual designer who can then update the master sketch file with any changes.

Handlebars guidelines

For information on how to contribute, refer to our guidelines.

CSS/Sass guidelines

For more information on using CSS and Sass, refer to our guidelines.

Custom icon guidelines

For more information on custom icons, refer to our guidelines.

Beta components

When creating a brand new component, it should be released as beta in order to get feedback.

Testing for accessibility

PatternFly uses aXe: The Accessibility Engine to check for accessibility violations. Our goal is to meet WCAG 2.0 AA requirements, as noted in our Accessibility guide.

How to perform an accessibility audit with aXe

aXe is available as either a browser extension or npm script.

To run the a11y audit locally:

  • install the latest chromedriver and ensure its available on your system $PATH
    • macOS users can simply brew cask install chromedriver
  • open a terminal and run yarn build && yarn serve
  • in another terminal, run yarn a11y

The tool is configured to return WCAG 2.0 AA violations for the full page renderings of all components, layouts, utilities, and demos. The tool will provide feedback about what the violation is and a link to documentation about how to address the violation.

The same tool is also available as a browser extension for Chrome and Firefox.

Fixing violations

Ignore the violations that aren’t related to your contribution.

Fix violations related to your contribution.

If there are violations that are not obvious how to fix, then create an issue with information about the violation that was found. For example, some violations might require further discussion before they can be addressed. And some violations may not be valid and require changes to the workspace or tooling to stop flagging the violation.

If you have any suggestions about ways that we can improve how we use this tool, please let us know by opening an issue.

FAQ

CSS Variables

How do I use CSS variables to customize the library?

Browser support

PatternFly 5 is supported on the latest two major versions of the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

patternfly-design's People

Contributors

amarie401 avatar andresgalante avatar beanh66 avatar bleathem avatar bmignano avatar catrobson avatar cshinn avatar dabeng avatar deernano avatar jennyhaines avatar jgiardino avatar jryhanyc avatar junezhang avatar kybaker avatar lhinson avatar lizsurette avatar lwrigh avatar maryclarke avatar matthewcarleton avatar mcarrano avatar mcoker avatar mgranfie avatar nding-anges avatar rohoover avatar serenamarie125 avatar sjcox-rh avatar stacymcauliffe avatar suzannehillman avatar terezanovotna avatar zhutaoredhat avatar

Stargazers

 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  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

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

patternfly-design's Issues

Table View: Table View is presented differently from Card and List views

The pattern library currently includes three parallel view types for presenting summary level content: Card, List, and Table views. Card and List views are presented as full page examples to show how this view can be used in the context of a page. Table View is presented as a stand-alone pattern without additional context. Table view seems to focus more specifically on behaviors associated with data tables.

Recommendation: Create a full page Table View pattern that shows how a table can be used for a summary view similar to List or Card views. Separate out details of data table interaction into a new pattern as tables may be useful in a variety of view contexts.

List View: Inconsistent behavior for row expansion

Behavior for row expansion is inconsistent between HTML and Angular implementations. HTML expands when clicking the row. Angular only when clicking the caret icon. Design is closer to HTML implelmentation.

List View: Inconsistent/incomplete examples between HMTL/CSS and Angular

The Angular implementation does not present row variations as does the HTML/CSS example. There is also no guidance on how these variations can be used, what types of element are available and how they can be defined.

Recommendation: Provide more context for examples and explain general template that should be used to format list items. This would promote better consistency between designs that use list view. Create consistent HTML and Angular examples that implement these variations.

Forms Patterns: Numerous inconsistencies between Forms design and other patterns

The Forms pattern has numerous inconsistencies with other patterns in the library. Some specific issues are:

  • Inconsistency between button usage in examples and other button guidelines in PatternFly.
  • Inconsistency between labeling recommendations between Forms and Form Field Layout pages.

Current Forms pattern only addresses simple data entry forms focusing on modals.

Recommendation: Entire Forms section should be reconsidered using a top-down approach. What are the patterns we need? How do we leverage existing work that was done? Where are the gaps.

Bar Chart: Interactive Legend should be a sub-bullet

On this page - http://www.patternfly.org/pattern-library/data-visualization/bar-chart/#/api

Right now it looks like:
Legend: It is recommended to include a legend to define the colors on the chart. On the bar chart, the legend may be located left aligned and underneath the chart or left aligned and to the right of the chart. - Interactive Legend (optional): Clicking on a series in the legend should toggle the visibility of the series in the chart.

and should look like...

  • Legend: It is recommended to include a legend to define the colors on the chart. On the bar chart, the legend may be located left aligned and underneath the chart or left aligned and to the right of the chart.
    • Interactive Legend (optional): Clicking on a series in the legend should toggle the visibility of the series in the chart.

Document capitalization recommendation for kebab menu items

The PF kebab example (https://www.patternfly.org/pattern-library/widgets/#kebabs) shows sentence style capitalization for menu items.

In PF T&W (http://www.patternfly.org/styles/terminology-and-wording/) the section for Capitalization for Common Components - it doesn’t talk about capitalization for menu items. But it does say to use Headline capitalization for Button labels. My thought would be Headline would be used for menu items as well.

Could the appropriate recommendation be added to the documentation?

Heat Map should be capitalized

  • All instances of "heat map" should be "Heat Map" on the Overview tab
  • Instead of referring to "a" heat map, we want to refer specifically to our heat map. Therefore...
    • Instead of "A heat map is a visualization of objects as blocks in a grid.", change to "The Heat Map is a visualization of objects as blocks in a grid. "
    • Instead of "When heat map items become so...", change to "When the Heat Map items become...."
    • Instead of "The most common use cases for a heat map are:", change to "The most common use cases for the Heat Map are:"

http://www.patternfly.org/pattern-library/data-visualization/heat-map/#/api

Utilization Bar Card: Internal inconsistencies between design and implementation

The are various inconsistencies and omissions between design, HTML, and Angular examples. These include:

  • Angular examples do not include top-labeled bars as per HTML example and design.
  • Tooltip styles are inconsistent between HTML and Angular example. HTML chart does not display PatternFly standard tool tips.
  • Examples do not consistently express utilization in bar labeling.

There is also no reference to bar labeling in design description and when to use top labeled vs. left/right labeled bars or explanation of color coding.

Dashboard Card (Base): Needs further elaboration

The Dashboard Card (Base) pattern is intended as a general container for other dashboard cards, but the relationship between this pattern and other dashboard card patterns in unclear. These is also redundancy between the documentation of features that may be part of the card base pattern (like the time frame filter) rather than the card content itself. This seems like a perfect opportunity for modularization where all dashboard cards are constructed from a consistent base container and additional charts.

There are also inconsistencies between design page and examples around Title formatting. Design says Title is always followed by a horizontal separator, but this is not true in all examples.

* drag-and-drop filenames are incorrect

the design and overview files in the drag-and-drop folder are incorrectly named.
Currently, they are called drag-drop_design.md and drag-drop_overview.md; they should be called design.md and overview.md

Bar Chart: "-" should be removed

On the design tab (http://www.patternfly.org/pattern-library/data-visualization/bar-chart/#/api), after item "5. Bar:", there is a bug because "Interaction" has a "-" before it. I think it was supposed to be a sub-bullet.

It should look like...

  • Bar:
    • Interaction:
      • If drill down behavior is supported, clicking on a bar will navigate to the appropriate page.
      • If supported, right clicking on an bar will bring up a menu with associated actions. If you are using a grouped bar chart, right clicking on a group will bring up a menu with associated actions for that group.
    • Width: All bars should be the same width.
    • Color: For recommendations on fill colors, see the Color Palette.
    • Height: Bar height in vertical charts is the dimension that represents its value.
    • Spacing: Spacing between bars should be equal. In the case of grouped charts, increase the spacing between main categories.

List View/Card View: Drill-down behavior needs clarification

Existing documentation is not clear about how to handle drill-down if multiple elements within a list item or card are linked. Current guidance that a single click on a list or card item should drill down to the next level may not be sufficient for all use cases.

Recommendation: Consider cases where there may be multiple drill-down links and how one should handle this case vs. single drill-down link.

* consolidate the cards and a card folder

There should not be a cards AND a card folder under the pattern-library. add the design folder for "card" underneath the "cards" folder and removed the "card" folder from the pattern-library

Trend Card: Internal inconsistencies between design examples and implementations

There are multiple inconsistencies between trend card design examples and Angular implementation examples. Some of these include:

  • Treatment of card with single trend and card with multiple trends are inconsistent in appearance of card title, placement of time frame selector, and placement of text labels.
  • Treatment and placement of card titles differs between examples.

Card View: Inconsistent appearance and behavior between HTML and Angular implementation

In the Card View pattern, the HTML and Angular implementations don't match. HTML follows the design in terms of form and function. Angular implementation lacks formatted card contents and supports selection options that are not described in the design.

Recommend to update Angular card appearance and clarify selections model (updating the design if necessary).

Broken resource links

Same issue as patternfly/patternfly#607, jquery.matchHeight-min.js has changed location.

However there are also some pages that pull resources from CDNs and I suppose that's not what you want. Changing those would require further synchronization with patternfly-org.

List view design doc link to Pagination incorrect

The list view design documentation has the following:

"Pagination: Card view can also support pagination. See Pagination for more details."

Should say Card view instead of list view. Link goes to github instead of the pattern on the site.

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.