Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stage branch #143

Merged
merged 9 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
last 1 chrome version
last 1 firefox version
last 1 edge version
safari >= 14
ios_saf >= 14
19 changes: 19 additions & 0 deletions .eslintrc-code-compatibility.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {

Check warning on line 1 in .eslintrc-code-compatibility.js

View workflow job for this annotation

GitHub Actions / Running eslint

[eslint] reported by reviewdog 🐶 File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override. Raw Output: {"fatal":false,"severity":1,"message":"File ignored by default. Use a negated ignore pattern (like \"--ignore-pattern '!<relative/path/to/filename>'\") to override."}
root: true,
extends: ['plugin:compat/recommended', 'plugin:ecmalist/recommended'],
settings: { es: { aggressive: true } },
env: { browser: true, mocha: true },
parser: '@babel/eslint-parser',
parserOptions: {
allowImportExportEverywhere: true,
sourceType: 'module',
requireConfigFile: false,
},
plugins: [
"eslint-plugin-import",
],
ignorePatterns: [
'/libs/deps/*',
'/tools/loc/*',
],
};
37 changes: 29 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
root: true,
extends: 'airbnb-base',
extends: ['airbnb-base', 'plugin:react-hooks/recommended', 'plugin:compat/recommended', 'plugin:ecmalist/recommended'],
settings: { es: { aggressive: true } },
env: { browser: true, mocha: true },
parser: '@babel/eslint-parser',
parserOptions: {
Expand All @@ -9,25 +10,45 @@ module.exports = {
requireConfigFile: false,
},
rules: {
// allow reassigning param
'no-param-reassign': [2, { props: false }],
'linebreak-style': ['error', 'unix'],
'chai-friendly/no-unused-expressions': 2,
'import/extensions': ['error', { js: 'always' }],
'import/no-cycle': 0,
'linebreak-style': ['error', 'unix'],
'no-await-in-loop': 0,
'no-param-reassign': [2, { props: false }],
'no-restricted-syntax': [
'error',
{
selector: 'ForInStatement',
message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
},
{
selector: 'LabeledStatement',
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
'no-return-assign': ['error', 'except-parens'],
'no-unused-expressions': 0,
'object-curly-newline': ['error', {
ObjectExpression: { multiline: true, minProperties: 6 },
ObjectPattern: { multiline: true, minProperties: 6 },
ImportDeclaration: { multiline: true, minProperties: 6 },
ExportDeclaration: 'never',
ExportDeclaration: { multiline: true, minProperties: 6 },
}],
'no-unused-expressions': 0,
'chai-friendly/no-unused-expressions': 2,
},
overrides: [
{
files: ['test/**/*.js'],
rules: { 'no-console': 'off' },
rules: { 'no-console': 0 },
},
],
ignorePatterns: [
'/tools/loc/*',
],
plugins: [
'chai-friendly',
],
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/code-compatibility.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check code compatibility with Milo supported browsers

on:
push:
branches:
- main
pull_request:

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check for unsupported functions
run: |
# Install eslint and its plugins
npm install

# Check for unsupported functions in the code
npx eslint --no-eslintrc -c .eslintrc-code-compatibility.js .
27 changes: 27 additions & 0 deletions .github/workflows/run-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- '**.js'

jobs:
run-lint:
name: Running eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Run eslint on changed files
uses: tj-actions/eslint-changed-files@v20
with:
config_path: ".eslintrc.js"
# ignore_path: "/path/to/.eslintignore"
# extra_args: "--max-warnings=0"
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [18.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
14 changes: 14 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# BACOM CODEOWNERS
# When you create a new block or tool please establish ownership in this file.
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners


# BACOM Core
* @brandon32 @JasonHowellSlavin @meganthecoder

# BACOM Blocks - last matching pattern takes precedence
/blocks/chat-cta @JasonHowellSlavin
/blocks/comparison @brandon32
/blocks/event-speakers @meganthecoder
/blocks/faas-decode @meganthecoder
/blocks/tree-view @meganthecoder
1 change: 1 addition & 0 deletions blocks/faas-decode/faas-decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default async function init(el) {
const resp = await fetch(url);

if (!resp?.ok) {
// eslint-disable-next-line no-console
console.log(`Error fetching data from url: ${url}`);
return;
}
Expand Down
114 changes: 114 additions & 0 deletions blocks/form/form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
main .form {
background-color: #3E3E3E;
padding-top: 34px;
min-height: 218px;
}

main .form > div {
margin-left: 35%;
}

main .form h2 {
color: white;
margin-bottom: 15px;
margin-top: unset;
}

main .form.hide h2 {
display: none;
}

main .section .content.hide {
display: none;
}

main .form input {
border: 1px solid rgb(193 193 195);
padding: 11px;
border-radius: 10px;
width: 50%;
max-width: 50rem;
box-sizing: border-box;
}

main .form p {
font-size: var(--type-heading-l-size);
line-height: var(--type-heading-l-lh);
margin-top: unset;
}

main form .form-text-field-wrapper p {
font-size: 18px;
color: white;
margin: 0;
}

.form-container .default-content-wrapper.hide,
main form.hide {
display: none;
}

main .form .trial-sign-up-message {
color: white;
max-width: 55%;
}

.form-container .default-content-wrapper p {
font-size: 18px;
}

main .form label.form-label {
position: relative;
}

main .form label.form-label.alert::after {
content: "";
position: absolute;
right: 12px;
width: 20px;
height: 20px;
margin-top: 14px;
margin-bottom: 7px;
background: url("/img/ui/Alert.svg") no-repeat;
}

main .form .button {
font-size: 24px;
}

main .form .highlight {
border-color: #E34850;
}

main .form .form-submit-wrapper {
width: 50%;
text-align: end;
}

main .form .form-submit-wrapper .button.primary {
font-family: var(--body-font-family);
text-decoration: none;
border: 2px solid #C8C8C8;
padding: 6px 16px 9px;
font-size: 17px;
font-weight: 600;
cursor: pointer;
color: #C8C8C8;
background-color: #3E3E3E;
margin-top: 30px;
border-radius: 30px;
}

@media screen and (max-width: 768px) {
main .form > div {
margin-left: 15%;
}

main .form input {
width: 85%;
}

main .form .form-submit-wrapper {
width: 85%;
}
}
Loading
Loading