Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix/4363-scroll-pos…
Browse files Browse the repository at this point in the history
…ition
  • Loading branch information
evwilkin committed Nov 12, 2024
2 parents 3bbc9ef + 9024016 commit c9ad9a5
Show file tree
Hide file tree
Showing 25 changed files with 523 additions and 37 deletions.
35 changes: 35 additions & 0 deletions packages/ast-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 1.4.0-alpha.122 (2024-11-06)

**Note:** Version bump only for package @patternfly/ast-helpers





# 1.4.0-alpha.121 (2024-10-31)

**Note:** Version bump only for package @patternfly/ast-helpers





# 1.4.0-alpha.120 (2024-10-31)

**Note:** Version bump only for package @patternfly/ast-helpers





# 1.4.0-alpha.119 (2024-10-30)


### Bug Fixes

* Updated with patch from virtual assistant. ([#4358](https://github.com/patternfly/patternfly-org/issues/4358)) ([ccab899](https://github.com/patternfly/patternfly-org/commit/ccab899478cb48eafd0f39eca998f790d6ffb38b))





# 1.4.0-alpha.118 (2024-10-30)

**Note:** Version bump only for package @patternfly/ast-helpers
Expand Down
2 changes: 1 addition & 1 deletion packages/ast-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@patternfly/ast-helpers",
"description": "Acorn AST helpers for working with live code",
"version": "1.4.0-alpha.118",
"version": "1.4.0-alpha.122",
"author": "Red Hat",
"license": "MIT",
"publishConfig": {
Expand Down
35 changes: 35 additions & 0 deletions packages/documentation-framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 6.0.6 (2024-11-06)

**Note:** Version bump only for package @patternfly/documentation-framework





## 6.0.5 (2024-10-31)

**Note:** Version bump only for package @patternfly/documentation-framework





## 6.0.4 (2024-10-31)

**Note:** Version bump only for package @patternfly/documentation-framework





## 6.0.3 (2024-10-30)


### Bug Fixes

* Updated with patch from virtual assistant. ([#4358](https://github.com/patternfly/patternfly-org/issues/4358)) ([ccab899](https://github.com/patternfly/patternfly-org/commit/ccab899478cb48eafd0f39eca998f790d6ffb38b))





## 6.0.2 (2024-10-30)

**Note:** Version bump only for package @patternfly/documentation-framework
Expand Down
4 changes: 2 additions & 2 deletions packages/documentation-framework/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@patternfly/documentation-framework",
"description": "A framework to build documentation for PatternFly.",
"version": "6.0.2",
"version": "6.0.6",
"author": "Red Hat",
"license": "MIT",
"private": false,
Expand All @@ -13,7 +13,7 @@
"@babel/preset-env": "^7.24.3",
"@babel/preset-react": "^7.24.1",
"@mdx-js/util": "1.6.16",
"@patternfly/ast-helpers": "^1.4.0-alpha.118",
"@patternfly/ast-helpers": "^1.4.0-alpha.122",
"@reach/router": "npm:@gatsbyjs/[email protected]",
"autoprefixer": "9.8.6",
"babel-loader": "^9.1.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/documentation-framework/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Releases": [
{
"name": "6.0.0",
"date": "2024-10-24",
"date": "2024-10-30",
"latest": true,
"versions": {
"@patternfly/patternfly": "6.0.0",
Expand All @@ -23,7 +23,7 @@
"@patternfly/quickstarts": "6.0.0",
"@patternfly/react-virtualized-extension": "6.0.0",
"@patternfly/react-templates": "6.0.0",
"@patternfly/virtual-assistant": "2.0.0"
"@patternfly/virtual-assistant": "2.0.2"
}
},{
"name": "prerelease",
Expand Down
4 changes: 2 additions & 2 deletions packages/documentation-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"screenshots": "pf-docs-framework screenshots"
},
"dependencies": {
"@patternfly/documentation-framework": "6.0.0",
"@patternfly/documentation-framework": "6.0.1",
"@patternfly/react-catalog-view-extension": "6.0.0",
"@patternfly/react-console": "6.0.0",
"@patternfly/react-docs": "7.0.0",
Expand All @@ -27,7 +27,7 @@
"@patternfly/react-component-groups": "6.0.0",
"@patternfly/react-virtualized-extension": "6.0.0",
"@patternfly/quickstarts": "6.0.0",
"@patternfly/virtual-assistant": "2.0.0",
"@patternfly/virtual-assistant": "2.0.2",
"@patternfly/design-tokens": "1.13.0",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ws-docs-content-img {
text-align: center;
margin-inline: auto;
width: 100%;
max-width: 700px;
}
text-align: center;
margin-inline: auto;
width: 100%;
max-width: 700px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,46 @@ id: Context selector
section: components
subsection: menus
---
import '../components.css';

## Elements

<img src="./img/elements.png" alt="elements image with callouts " width="357"/>
<div class="ws-docs-content-img">
![Primary elements of a context selector.](./img/context-selector-elements.svg)
</div>

1. Dropdown
2. Menu
3. Search (optional)
4. Footer/ action button (optional)
1. **Dropdown menu toggle**
2. **Search (optional):** Allows users to search through long menus.
3. **Menu**
4. **Footer (optional):** Can contain an action link button.

## Usage

Context selectors enable a user to switch between different application contexts. They can be placed at many levels of an application’s information architecture and may have different behavior expectations based on the level it is placed in. They can be placed in a page masthead, at the top of vertical navigations, or at the top of a page, depending on your website or product's navigation and preference.
Context selectors enable a user to switch between different application contexts. They can be placed at many levels of an application’s information architecture and may have different behavior expectations based on the level it is placed in. They can be placed in a page masthead, at the top of vertical navigation, or at the top of a page, depending on your website or product's navigation and preference.

Context selectors differ from filters in that a filter takes an overall set of content and reduces it to a subset of content. In comparison, a context selector takes a set of content and changes it to a different set of content.

### Using actions in a context selector
### Using search in a context selector
If your context selector has a lot of options, you may opt to add a search bar at the top of the menu, divided by a separator.

<img src="./img/search.png" alt="Example of a context selector with a search bar at the top" width="280"/>
<div class="ws-docs-content-img">
![Context selector menu with a search bar.](./img/context-selector-search.svg)
</div>

### Using footers in context selector
If you have more actions you would like to add to a context selector, you may add a footer with actions at the bottom of the menu. The menu list inside it will be scrollable, while the footer will remain fixed so that the action is always visible. For the actions inside the footer, you may use a secondary or link button.
If you have more actions you would like to add to a context selector, you may add a footer with actions at the bottom of the menu. The menu list inside it will be scrollable, while the footer will remain fixed so that the action is always visible. For the actions inside the footer, use a link button.


<img src="./img/actions.png" alt="Example of a context selector with an action footer at the bottom of the menu list" width="640"/>
<div class="ws-docs-content-img">
![Context selector menu with a link in the footer.](./img/context-selector-footer.svg)
</div>

## Variations
* [Application-wide impact](#application-wide-impact)
* [Navigation-level impact](#navigation-level-impact)
* [Page-level impact](#page-level-impact)

### Application-wide impact
When a context selector has an application-wide impact the user is expected to choose a context that will set the content of the entire application. The list of choices inside the selector's menu can be dynamic and long, but the navigation for any of those choices should not change.
When a context selector has an application-wide impact the user is expected to choose a context that will set the content of the entire application. The list of choices inside the selector's menu can be dynamic and long, but the navigation for any of those choices should not change.

#### When to use
Some common use cases for using a context selector with an application-wide impact include:
Expand All @@ -46,7 +52,9 @@ Some common use cases for using a context selector with an application-wide impa
#### Placement
It is recommended that a context selector that has an application-wide impact be placed in the masthead, above the main navigation. This creates an effect that the entire application is changing, rather than just changing the views or navigation within an application.

<img src="./img/application-wide.png" alt="Example of a context selector with application wide impact, placed in the masthead" width="990"/>
<div class="ws-docs-content-img">
![Context selector in masthead.](./img/masthead-context-selector.svg)
</div>

### Navigation-level impact
When a context selector has a navigation-level impact, the user is expected to use the main navigation to get to the area of the overall application that they expect to work with, and then choose a context for that working area. The list of choices can be dynamic and long, but the navigation affected for any of those choices should not change.
Expand All @@ -58,9 +66,11 @@ Some common use cases for using context selectors with a navigation-wide impact
* To set the context of the pages across all navigation items.

#### Placement
It is recommended that a context selector with navigation-level impact, be placed at the top of navigation if it affects all navigation options so that it is tightly coupled with the navigation to show change/effect.
It is recommended that a context selector with navigation-level impact be placed at the top of navigation if it affects all navigation options so that it is tightly coupled with the navigation to show change/effect.

<img src="./img/navigation-level.png" alt="Example of a context selector with navigation level impact, placed at the top of the navigation" width="990"/>
<div class="ws-docs-content-img">
![Context selector at the top of the navigation menu.](./img/nav-context-selector.svg)
</div>

### Page-level impact
In this case, the user is expected to choose a context that will set the content of the entire page. The list of choices can be static or dynamic. If it is static and below about 8 options, tabs or another tertiary navigation pattern should be considered.
Expand All @@ -69,7 +79,8 @@ In this case, the user is expected to choose a context that will set the content
A common use case for using a page-level context selector is as a means for users to view the same information from different angles. For example, if you have a page of “Projects”, having a context selector would allow users to view different project types within the same page, without changing where they are in the main navigation.

#### Placement
It is recommended that a page-level context selector be placed at the top of the page or page section that the context selector controls.

<img src="./img/tertiary-lower.png" alt="Example of a context selector with page impact, placed at the top of a page" width="1500"/>
It is recommended that a page-level context selector be placed at the top of the page or page section that the context selector controls. If there are breadcrumbs, place the selector above the breadcrumbs.

<div class="ws-docs-content-img">
![Context selector placed within the page content, above breadcrumbs.](./img/page-context-selector.svg)
</div>
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit c9ad9a5

Please sign in to comment.