Skip to content

Commit

Permalink
Merge pull request ant-design#25829 from ant-design/master
Browse files Browse the repository at this point in the history
chore: merge master into feature
  • Loading branch information
07akioni authored Jul 27, 2020
2 parents f38f297 + fbc10c4 commit 3247772
Show file tree
Hide file tree
Showing 42 changed files with 913 additions and 504 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module.exports = {
'react/static-property-placement': 0,
'react/no-find-dom-node': 0,
'react/no-unused-prop-types': 0,
'react/default-props-match-prop-types': 0,
'react-hooks/rules-of-hooks': 2, // Checks rules of Hooks

'import/extensions': 0,
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
54 changes: 54 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [master, 0.12-stable, 1.x-stable, 2.x-stable, 3.x-stable, feature, gh-pages]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 13 * * 1'

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
35 changes: 35 additions & 0 deletions components/alert/__tests__/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-banner"
data-show="true"
role="alert"
>
<span
aria-label="exclamation-circle"
Expand Down Expand Up @@ -39,6 +40,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-banner ant-alert-closable"
data-show="true"
role="alert"
>
<span
aria-label="exclamation-circle"
Expand Down Expand Up @@ -99,6 +101,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-no-icon ant-alert-banner"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -113,6 +116,7 @@ Array [
<div
class="ant-alert ant-alert-error ant-alert-banner"
data-show="true"
role="alert"
>
<span
aria-label="close-circle"
Expand Down Expand Up @@ -150,6 +154,7 @@ exports[`renders ./components/alert/demo/basic.md correctly 1`] = `
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -167,6 +172,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-no-icon ant-alert-closable"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down Expand Up @@ -206,6 +212,7 @@ Array [
<div
class="ant-alert ant-alert-error ant-alert-with-description ant-alert-no-icon ant-alert-closable"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down Expand Up @@ -251,6 +258,7 @@ exports[`renders ./components/alert/demo/close-text.md correctly 1`] = `
<div
class="ant-alert ant-alert-info ant-alert-no-icon ant-alert-closable"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down Expand Up @@ -279,6 +287,7 @@ Array [
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -292,6 +301,7 @@ Array [
<div
class="ant-alert ant-alert-success"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -325,6 +335,7 @@ Array [
<div
class="ant-alert ant-alert-info"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -358,6 +369,7 @@ Array [
<div
class="ant-alert ant-alert-warning"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -391,6 +403,7 @@ Array [
<div
class="ant-alert ant-alert-error"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -424,6 +437,7 @@ Array [
<div
class="ant-alert ant-alert-success ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -459,6 +473,7 @@ Array [
<div
class="ant-alert ant-alert-info ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -494,6 +509,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -529,6 +545,7 @@ Array [
<div
class="ant-alert ant-alert-error ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="smile"
Expand Down Expand Up @@ -569,6 +586,7 @@ Array [
<div
class="ant-alert ant-alert-success ant-alert-with-description ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -584,6 +602,7 @@ Array [
<div
class="ant-alert ant-alert-info ant-alert-with-description ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -599,6 +618,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-with-description ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -614,6 +634,7 @@ Array [
<div
class="ant-alert ant-alert-error ant-alert-with-description ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down Expand Up @@ -645,6 +666,7 @@ Array [
<div
class="ant-alert ant-alert-success"
data-show="true"
role="alert"
>
<span
aria-label="check-circle"
Expand Down Expand Up @@ -678,6 +700,7 @@ Array [
<div
class="ant-alert ant-alert-info"
data-show="true"
role="alert"
>
<span
aria-label="info-circle"
Expand Down Expand Up @@ -711,6 +734,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-closable"
data-show="true"
role="alert"
>
<span
aria-label="exclamation-circle"
Expand Down Expand Up @@ -770,6 +794,7 @@ Array [
<div
class="ant-alert ant-alert-error"
data-show="true"
role="alert"
>
<span
aria-label="close-circle"
Expand Down Expand Up @@ -803,6 +828,7 @@ Array [
<div
class="ant-alert ant-alert-success ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="check-circle"
Expand Down Expand Up @@ -841,6 +867,7 @@ Array [
<div
class="ant-alert ant-alert-info ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="info-circle"
Expand Down Expand Up @@ -879,6 +906,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-with-description ant-alert-closable"
data-show="true"
role="alert"
>
<span
aria-label="exclamation-circle"
Expand Down Expand Up @@ -943,6 +971,7 @@ Array [
<div
class="ant-alert ant-alert-error ant-alert-with-description"
data-show="true"
role="alert"
>
<span
aria-label="close-circle"
Expand Down Expand Up @@ -985,6 +1014,7 @@ exports[`renders ./components/alert/demo/loop-banner.md correctly 1`] = `
<div
class="ant-alert ant-alert-warning ant-alert-banner"
data-show="true"
role="alert"
>
<span
aria-label="exclamation-circle"
Expand Down Expand Up @@ -1037,6 +1067,7 @@ exports[`renders ./components/alert/demo/smooth-closed.md correctly 1`] = `
<div
class="ant-alert ant-alert-success ant-alert-no-icon ant-alert-closable"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down Expand Up @@ -1084,6 +1115,7 @@ Array [
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -1097,6 +1129,7 @@ Array [
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -1110,6 +1143,7 @@ Array [
<div
class="ant-alert ant-alert-warning ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -1123,6 +1157,7 @@ Array [
<div
class="ant-alert ant-alert-error ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down
3 changes: 3 additions & 0 deletions components/alert/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`Alert ErrorBoundary 1`] = `
<div
class="ant-alert ant-alert-error ant-alert-with-description ant-alert-no-icon"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand All @@ -26,6 +27,7 @@ exports[`Alert could accept none react element icon 1`] = `
<div
class="ant-alert ant-alert-success"
data-show="true"
role="alert"
>
<span
class="ant-alert-icon"
Expand All @@ -47,6 +49,7 @@ exports[`Alert rtl render component should be rendered correctly in RTL directio
<div
class="ant-alert ant-alert-info ant-alert-no-icon ant-alert-rtl"
data-show="true"
role="alert"
>
<span
class="ant-alert-message"
Expand Down
1 change: 1 addition & 0 deletions components/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ const Alert: AlertInterface = ({
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
onClick={onClick}
role="alert"
{...dataOrAriaProps}
>
{isShowIcon ? renderIconNode() : null}
Expand Down
Loading

0 comments on commit 3247772

Please sign in to comment.