Skip to content
Snippets Groups Projects
Select Git revision
  • ag-test
  • rs-test
  • master default protected
  • test-me-pa
  • mksionek-master-patch-52381
  • new-branch-10
  • test-conflicts
  • test-suggestions
  • alejandro-test
  • patch-25
  • winh-test-image-doscussion
  • stg-lfs-image-test-2
  • stg-lfs-image-test
  • test42016
  • issue_42016
  • issue-32709
  • add-codeowners
  • ClemMakesApps-master-patch-62759
  • bvl-staging-test
  • bvl-merge-base-api
  • v9.2.0-rc6 protected
  • v9.2.0-rc5 protected
  • v9.2.0-rc4 protected
  • v9.2.0-rc3 protected
  • v9.1.4 protected
  • v9.2.0-rc2 protected
  • v9.2.0-rc1 protected
  • v9.1.3 protected
  • v8.17.6 protected
  • v9.0.7 protected
  • v9.1.2 protected
  • v9.1.1 protected
  • v9.2.0.pre protected
  • v9.1.0 protected
  • v9.1.0-rc7 protected
  • v9.1.0-rc6 protected
  • v9.0.6 protected
  • v9.1.0-rc5 protected
  • v9.1.0-rc4 protected
  • v9.1.0-rc3 protected
40 results

components.md

Blame
    • Chris Peressini's avatar
      877c225c
      Document button secondary states. Update icons and color section · 877c225c
      Chris Peressini authored
      Describe hover, focus and active states for primary and secondary
      buttons.
      
      Organized the icons section in a table. Replaced images for icons
      so they are all the same size.
      
      Organized the color section in a table. Replaced the images with
      new ones so the table would have a more manageable size. Updated
      the values for some colors to show the $color-light shade.
      
      Remove commented sections
      
      Remove `db/schema.rb`
      
      Add db/schema.rb from origin/master
      
      Fix typos
      877c225c
      History
      Document button secondary states. Update icons and color section
      Chris Peressini authored
      Describe hover, focus and active states for primary and secondary
      buttons.
      
      Organized the icons section in a table. Replaced images for icons
      so they are all the same size.
      
      Organized the color section in a table. Replaced the images with
      new ones so the table would have a more manageable size. Updated
      the values for some colors to show the $color-light shade.
      
      Remove commented sections
      
      Remove `db/schema.rb`
      
      Add db/schema.rb from origin/master
      
      Fix typos
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    components.md 9.32 KiB

    Components

    Contents


    Tooltips

    Usage

    A tooltip should only be added if additional information is required.

    Tooltip usage

    Placement

    By default, tooltips should be placed below the element that they refer to. However, if there is not enough space in the viewpoint, the tooltip should be moved to the side as needed.

    Tooltip placement location


    Anchor links

    Anchor links are used for navigational actions and lone, secondary commands (such as 'Reset filters' on the Issues List) when deemed appropriate by the UX team.

    States

    Rest

    Primary links are blue in their rest state. Secondary links (such as the time stamp on comments) are a neutral gray color in rest. Details on the main GitLab navigation links can be found on the features page.

    Hover

    On hover, an underline should be added and the color should change. Both the primary and secondary link should become the darker blue color on hover.

    Focus

    The focus state should match the hover state.

    Anchor link states


    Buttons

    Buttons communicate the command that will occur when the user clicks on them.

    Types

    Primary

    Primary buttons communicate the main call to action. There should only be one call to action in any given experience. Visually, primary buttons are conveyed with a full background fill

    Primary button example

    Secondary

    Secondary buttons are for alternative commands. They should be conveyed by a button with an stroke, and no background fill.

    Secondary button example

    Icon and text treatment

    Text should be in sentence case, where only the first word is capitalized. "Create issue" is correct, not "Create Issue". Buttons should only contain an icon or a text, not both.

    TODO: Rationalize this. Ensure that we still believe this.

    Colors

    The default color treatment is the white/grey button. Follow the guidance on the basics page to add meaningful color to a button.

    Secondary states

    Primary buttons darken the color of their background and border for hover, focus and active states. An inner shadow is added to the active state to denote the button being pressed.

    Values Info Success Warning Danger
    Background: $color-light
    Border: $border-color-light
    Background: $color-normal
    Border: $border-color-normal
    Background: $color-dark
    Border: $border-color-dark

    Since secondary buttons only have a border on their resting state, their hover and focus states add a background color, which gets darkened on active.

    Values Success Secondary Close Spam
    Font: $border-color-light
    Border: $border-color-light
    Background: $color-light
    Border: $border-color-light
    Background: $color-normal
    Border: $border-color-normal

    Dropdowns

    Dropdowns are used to allow users to choose one (or many) options from a list of options. If this list of options is more 20, there should generally be a way to search through and filter the options (see the complex filter dropdowns below.)

    TODO: Will update this section when the new filters UI is implemented.

    Dropdown states

    Max size

    The max height for dropdowns should target 10-15 items. If the height of the dropdown is too large, the list becomes very hard to parse and it is easy to visually lose track of the item you are looking for. Usability also suffers as more mouse movement is required, and you have a larger area in which you hijack the scroll away from the page level. While it may initially seem counterintuitive to not show as many items as you can, it is actually quicker and easier to process the information when it is cropped at a reasonable height.


    Counts

    A count element is used in navigation contexts where it is helpful to indicate the count, or number of items, in a list. Always use the number_with_delimiter helper to display counts in the UI.

    Counts example


    Lists

    Lists are used where ever there is a single column of information to display. Ths issues list is an example of a important list in the GitLab UI.

    Types

    Simple list using .content-list

    Simple list

    List with avatar, title and description using .content-list

    List with avatar

    List with hover effect .well-list

    List with hover effect

    List inside panel

    List inside panel


    Tables

    When the information is too complex for a list, with multiple columns of information, a table can be used. For example, the pipelines page uses a table.

    Table


    Blocks

    Blocks are a way to group related information.

    Types

    Content blocks

    Content blocks (.content-block) are the basic grouping of content. They are commonly used in lists, and are separated by a botton border.

    Content block

    Row content blocks

    A background color can be added to this blocks. For example, items in the issue list have a green background if they were created recently. Below is an example of a gray content block with side padding using .row-content-block.

    Row content block

    Cover blocks

    Cover blocks are generally used to create a heading element for a page, such as a new project, or a user profile page. Below is a cover block (.cover-block) for the profile page with an avatar, name and description.

    Cover block


    Panels

    TODO: Catalog how we are currently using panels and rationalize how they relate to alerts

    Panels


    Alerts

    TODO: Catalog how we are currently using alerts

    Alerts