Skip to content

Commit

Permalink
feat: new verb page layout and features (#1433)
Browse files Browse the repository at this point in the history
This is a fairly hefty change to the verb page on the console. I have
many follow on tasks, but this PR was getting a bit insane and most
things are working better than before now.


Some highlights include:

- New code editor (using code mirror now)
- Postman style interface that improves how test requests can be made
- Remove prettier and improve estlint config

![Screenshot 2024-05-07 at 2 43
05 PM](https://github.com/TBD54566975/ftl/assets/51647/ce787ae2-89a9-4be3-b237-ff7d66bce20d)
![Screenshot 2024-05-07 at 2 43
19 PM](https://github.com/TBD54566975/ftl/assets/51647/0c989478-8720-4668-bdd8-bdf30093128d)
![Screenshot 2024-05-07 at 2 43
37 PM](https://github.com/TBD54566975/ftl/assets/51647/751776ab-0b25-4054-aeee-bc1e06f6d76f)
![Screenshot 2024-05-07 at 2 43
39 PM](https://github.com/TBD54566975/ftl/assets/51647/0a4b9391-9205-4fcb-b5b5-c822d46624ad)
![Screenshot 2024-05-07 at 2 43
49 PM](https://github.com/TBD54566975/ftl/assets/51647/eff8626e-4aee-418e-90e5-a6e02d022079)
![Screenshot 2024-05-07 at 2 49
33 PM](https://github.com/TBD54566975/ftl/assets/51647/31ddb276-c3b1-4b66-9891-08110f6088f8)
  • Loading branch information
wesbillman authored May 7, 2024
1 parent ebbe010 commit 5b3f7c3
Show file tree
Hide file tree
Showing 17 changed files with 1,617 additions and 586 deletions.
13 changes: 8 additions & 5 deletions backend/controller/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,15 @@ func (c *ConsoleService) StreamEvents(ctx context.Context, req *connect.Request[
return err
}

err = stream.Send(&pbconsole.StreamEventsResponse{
Events: slices.Map(events, eventDALToProto),
})
if err != nil {
return err
if len(events) > 0 {
err = stream.Send(&pbconsole.StreamEventsResponse{
Events: slices.Map(events, eventDALToProto),
})
if err != nil {
return err
}
}

lastEventTime = thisRequestTime
select {
case <-time.After(updateInterval):
Expand Down
33 changes: 32 additions & 1 deletion frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended'],
overrides: [
{
env: {
Expand All @@ -22,6 +22,13 @@ module.exports = {
},
plugins: ['@typescript-eslint', 'react'],
rules: {
'semi': ['error', 'never'],
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
'jsx-quotes': ['error', 'prefer-single'],
'no-trailing-spaces': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 0, 'maxBOF': 0 }],
'eol-last': ['error', 'always'],
'max-len': ['error', { 'code': 120, 'tabWidth': 4, 'ignoreUrls': true, 'ignoreComments': false, 'ignoreRegExpLiterals': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true }],
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'func-style': ['error', 'expression'],
Expand All @@ -34,6 +41,30 @@ module.exports = {
'ts-ignore': 'allow-with-description',
},
],
'indent': ['error', 2, {
'SwitchCase': 1,
'VariableDeclarator': 1,
'outerIIFEBody': 1,
'MemberExpression': 1,
'FunctionDeclaration': {
'parameters': 1,
'body': 1
},
'FunctionExpression': {
'parameters': 1,
'body': 1
},
'CallExpression': {
'arguments': 1
},
'ArrayExpression': 1,
'ObjectExpression': 1,
'ImportDeclaration': 1,
'flatTernaryExpressions': false,
'ignoreComments': false
}],
'react/jsx-indent': ['error', 2],
'react/jsx-indent-props': ['error', 2]
},
settings: {
react: {
Expand Down
2 changes: 0 additions & 2 deletions frontend/.prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.prettierrc

This file was deleted.

Loading

0 comments on commit 5b3f7c3

Please sign in to comment.