Skip to content

Commit 9da2ef5

Browse files
sam-b-rosejesstelfordkyledurandJoel Warringtondependabot[bot]
authored
[v11.13.0] Update next branch with changes from main (#10238)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jess Telford <jess.telford@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com> Co-authored-by: Joel Warrington <joel.warrington@shopify.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matt Lavoie <44816587+m4thieulavoie@users.noreply.github.com> Co-authored-by: aveline <aveline@users.noreply.github.com> Co-authored-by: Aaron Casanova <32409546+aaronccasanova@users.noreply.github.com> Co-authored-by: Ash <siavash.etemadieh@shopify.com> Co-authored-by: shopify-github-actions-access[bot] <109624739+shopify-github-actions-access[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Maxime Cloutier <maxime.cloutier@shopify.com> Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com> Co-authored-by: Peter Lazzarino <peter.lazzarino@shopify.com>
1 parent b4b1e8d commit 9da2ef5

File tree

411 files changed

+1578
-14114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+1578
-14114
lines changed

.changeset/curly-chairs-speak.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': minor
3+
---
4+
5+
Add a search field to filter ActionList that have more than 10 items

.changeset/late-countries-remain.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/popular-pumas-sin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Ensure Avatar has no background color if an source prop is passed in to allow for transparent images

.eslintrc.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -98,29 +98,6 @@ module.exports = {
9898
},
9999
overrides: [
100100
...packages.map((packageDir) => noExtraneousDependenciesConfig(packageDir)),
101-
{
102-
files: ['polaris-cli/src/**/*.{ts,tsx}'],
103-
rules: {
104-
'import/no-default-export': 'off',
105-
},
106-
},
107-
{
108-
files: ['polaris-codemods/src/**/*.{ts,tsx}'],
109-
rules: {
110-
'import/no-default-export': 'off',
111-
// Issue with inconsistent import order between node 14 and 16.
112-
// This could be removed after dropping node 14 support.
113-
'import/order': 'off',
114-
},
115-
},
116-
{
117-
files: ['polaris-codemods/src/**/tests/*.{ts,tsx}'],
118-
rules: {
119-
'import/no-extraneous-dependencies': 'off',
120-
'@shopify/jsx-no-hardcoded-content': 'off',
121-
'@typescript-eslint/ban-ts-comment': 'off',
122-
},
123-
},
124101
{
125102
files: ['polaris-migrator/src/**/*.{ts,tsx}'],
126103
rules: {

documentation/Code style guide.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# `@shopify/polaris` Code Style Guide
2+
3+
## Introduction
4+
5+
The `@shopify/polaris` code style guide provides guidelines and best practices for writing consistent and maintainable code in the `@shopify/polaris` React component library. Adhering to this guide will help ensure code readability, consistency, and collaboration among developers. These guidelines are for items that are not enforced by automated tools like prettier, eslint, or stylelint-polaris
6+
7+
## Table of Contents
8+
9+
1. [Naming Conventions](#naming-conventions)
10+
1. [Control Structures and Flow](#control-structures-and-flow)
11+
1. [Error Handling](#error-handling)
12+
1. [Code Organization and Structure]1#code-organization-and-structure)
13+
1. [Examples and Code Snippets](#examples-and-code-snippets)
14+
15+
## Naming Conventions
16+
17+
- Use camel case for variable and function names.
18+
- Use Pascal case for component names.
19+
- Use Kebab case for props with a predefined list of strings.
20+
- Use descriptive and meaningful names that accurately represent the purpose of the variable, function, or component.
21+
22+
## Control Structures and Flow
23+
24+
- Use early returns or guard clauses to handle exceptional cases and reduce nesting.
25+
26+
## Error Handling
27+
28+
- Use `try-catch` blocks to handle exceptions and errors.
29+
- Provide meaningful error messages that help developers understand the issue.
30+
- Log errors appropriately for debugging and troubleshooting purposes.
31+
32+
## Code Organization and Structure
33+
34+
- Organize code files and directories logically and consistently.
35+
- Use meaningful and descriptive file and directory names.
36+
- Follow the recommended folder structure for components, utilities, and tests.
37+
- Import modules and components in alphabetical order.
38+
- Group related functions and variables together within a file.
39+
- Include [JSDoc tags](https://jsdoc.app/) to describe default prop values
40+
41+
## Examples and Code Snippets
42+
43+
- Include examples and code snippets in the documentation to demonstrate usage and best practices.
44+
- Provide clear and concise code examples that highlight the recommended coding style and patterns.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
},
88
"workspaces": {
99
"packages": [
10-
"polaris-cli",
11-
"polaris-codemods",
1210
"polaris-tokens",
1311
"polaris-for-vscode",
1412
"polaris-icons",

0 commit comments

Comments
 (0)