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

Merge Console redesign into release branch #7263

Merged
merged 851 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
851 commits
Select commit Hold shift + click to select a range
b5a6463
console: Adjust spacings
ryaplots Jul 11, 2024
b0844af
console: Update locales
ryaplots Jul 11, 2024
d1869cc
console: Fix small screen
ryaplots Jul 11, 2024
e5cd25e
console: Use dateTime component for connection
ryaplots Jul 17, 2024
fa8c7fa
Merge remote-tracking branch 'origin/v3.31' into feature/console-rede…
kschiffer Jul 17, 2024
78de9a5
Merge pull request #7183 from TheThingsNetwork/fix/gateway-status-panel
ryaplots Jul 17, 2024
b883c1c
console: Fix orgnization breadcrumbs
ryaplots Jul 18, 2024
aae5a63
Merge pull request #7186 from TheThingsNetwork/fix/breadcrumbs
ryaplots Jul 18, 2024
9686f05
console: Fix autosuggest icons
ryaplots Jul 16, 2024
b6687b7
console: Fix organization view and rename collaborators to members
ryaplots Jul 16, 2024
546fd87
console: Update messages and remove unnecessary nodes
ryaplots Jul 16, 2024
50f00cc
console: Fix routes and breadcrumbs
ryaplots Jul 16, 2024
98462f1
console: Remove event start
ryaplots Jul 16, 2024
78cf136
console: Update messsages to member
ryaplots Jul 17, 2024
af86862
console: Fix tabs layout
ryaplots Jul 18, 2024
4962264
console: Add member message to validation schema
ryaplots Jul 18, 2024
0ac0792
console: Fix organization breadcrumbs
ryaplots Jul 18, 2024
b59f15c
Merge pull request #7187 from TheThingsNetwork/fix/organizations
ryaplots Jul 18, 2024
30ea54b
console: Add improved top entity logic
kschiffer Jul 4, 2024
19a249b
Merge pull request #7177 from TheThingsNetwork/feature/top-entities
kschiffer Jul 19, 2024
61c6b58
console: Add mac settings download dropdown
ryaplots Jul 19, 2024
9708fa2
console: Add links to org header
ryaplots Jul 19, 2024
7d7ca2a
console: Add delete device modal
ryaplots Jul 19, 2024
e18a2d2
console: Move gateway header
ryaplots Jul 19, 2024
c06ab9e
console: Fix side footer
ryaplots Jul 22, 2024
c1c8ba0
console: Fix device info panel
ryaplots Jul 22, 2024
7929860
console: Refactor getway delete modal to be generic and use
ryaplots Jul 22, 2024
816408c
dev: Fix merge
ryaplots Jul 22, 2024
a7c7ba0
console: Add new tables styles - toggle style and panel style
ryaplots Jul 12, 2024
61c06cf
console: Update existing tables with new styles
ryaplots Jul 12, 2024
6ccafe4
console: Update messages
ryaplots Jul 12, 2024
4e87520
console: Fix messages
ryaplots Jul 22, 2024
0e3bab8
console: Fix latest decoded payload
PavelJankoski Jul 22, 2024
12a8373
console: Fix application map panel
PavelJankoski Jul 22, 2024
8f10675
Merge pull request #7194 from TheThingsNetwork/fix/application-map-panel
PavelJankoski Jul 23, 2024
631fcaa
console: Fix device top entities panel
kschiffer Jul 23, 2024
664bd14
Merge pull request #7193 from TheThingsNetwork/fix/latest-decoded-pay…
PavelJankoski Jul 23, 2024
ef82e77
console: More table styling fixes
kschiffer Jul 24, 2024
b110388
console: Fix table style
ryaplots Jul 29, 2024
29d26c7
Merge pull request #7192 from TheThingsNetwork/fix/table-styling
ryaplots Jul 29, 2024
011295d
console: Refactor delete modal
ryaplots Jul 29, 2024
ab27197
console: Fix linting
ryaplots Jul 29, 2024
db3815c
Merge pull request #7191 from TheThingsNetwork/fix/mac-settings-download
ryaplots Jul 30, 2024
5aed9c2
console: Fix font and weight values
pierrephz Jul 29, 2024
6229a83
Merge branch 'feature/console-redesign' into fix/font-size
ryaplots Jul 30, 2024
06bf038
console: Fix interference of entity prefetching data with store state
kschiffer Jul 30, 2024
852ded7
console: Use Option+K as main hotkey for the search panel
kschiffer Jul 31, 2024
a9fad65
console: Change font sizes values
pierrephz Aug 1, 2024
985cac6
console: Allow map zoom only on cmd/ctrl + scroll
PavelJankoski Aug 1, 2024
ed4fe69
Merge pull request #7208 from TheThingsNetwork/fix/search-hotkey
kschiffer Aug 1, 2024
2fdd01e
Merge pull request #7214 from TheThingsNetwork/fix/map-scroll-on-cmd
PavelJankoski Aug 1, 2024
2d23233
Merge pull request #7207 from TheThingsNetwork/fix/top-entities-fetching
kschiffer Aug 1, 2024
df85c76
Merge pull request #7200 from TheThingsNetwork/fix/font-size
kschiffer Aug 1, 2024
7d2a292
console: Fix overview header styling
kschiffer Aug 1, 2024
6611523
console: Don't show application overview header on device routes
kschiffer Aug 1, 2024
4112657
console: Fix wrong icon
kschiffer Aug 1, 2024
981e82b
console: Fix styling of latest decoded payload header
kschiffer Aug 1, 2024
683a493
Merge remote-tracking branch 'origin/v3.32' into feature/console-rede…
kschiffer Aug 1, 2024
e4498f7
dev: Fix e2e tests
ryaplots Aug 1, 2024
70875e2
dev: Fix smoke tests
ryaplots Aug 1, 2024
acd4c98
console: Apply related fixes
ryaplots Aug 1, 2024
ecd003b
console: Update messages
ryaplots Aug 1, 2024
fe48fc6
dev: Fix console auth tests
ryaplots Aug 1, 2024
8840f4f
console: Fix scrollBehavior
ryaplots Aug 1, 2024
19d94a7
dev: Disable account app tests for the time being
ryaplots Aug 1, 2024
7cc7570
console: Fix notifications tests
ryaplots Aug 1, 2024
93e9f8e
dev: Scrolling things into view
ryaplots Aug 1, 2024
9c985c1
console: Fix offline badge
ryaplots Aug 2, 2024
218695d
console: Fix two more tests
ryaplots Aug 2, 2024
98c1fc2
console: Account for the fact that there may not be a url
ryaplots Aug 5, 2024
6431b0b
console: Fix font sizes
kschiffer Aug 6, 2024
58b4fcd
console,account: Make utilities !important
kschiffer Aug 1, 2024
f9e0ac4
console,account: Add missing color tokens
kschiffer Aug 1, 2024
081dd56
console,account: Fix scrollbar style
kschiffer Aug 1, 2024
52a1667
console,account: Fix button styles
kschiffer Aug 1, 2024
21e3a7a
console,account: Add tooltip option to button component
kschiffer Aug 1, 2024
847a79b
console,account: Add dark theme to code editor
kschiffer Aug 1, 2024
0713115
console,account: Forward ref of Link component
kschiffer Aug 1, 2024
c2d21a8
console,account: Fix safe inspector hover behavior and styling
kschiffer Aug 1, 2024
69e6212
console: Add live data overlay
kschiffer Aug 1, 2024
108f424
Merge pull request #7213 from TheThingsNetwork/feature/live-data-overlay
kschiffer Aug 6, 2024
af2d9fd
console: Fix event panel color tokens
kschiffer Aug 6, 2024
c81089f
console: Update upgradeUrl in upseller panel
PavelJankoski Aug 6, 2024
839e438
console: Fix sidebar app item disappear on register end device
ryaplots Aug 7, 2024
14a0fab
console: Fix end device title
ryaplots Aug 7, 2024
f7f5b5f
console: Fix issues with notifications
PavelJankoski Aug 1, 2024
5a21bf7
console: Add no selected notification state and fixes
PavelJankoski Aug 2, 2024
a40c1f8
console: Improve notifications
PavelJankoski Aug 5, 2024
3f57086
console: Fix gateway basic settings
PavelJankoski Aug 5, 2024
8ece511
console: Update notifications e2e tests and fixes
PavelJankoski Aug 5, 2024
ea5dbad
console: Apply various styling fixes
kschiffer Aug 7, 2024
b9757ba
console: Use smaller tooltip styling
kschiffer Aug 7, 2024
440b074
console: Add prop to allow word wraps in links
kschiffer Aug 7, 2024
96ba0d2
console: Streamline empty states of panels
kschiffer Aug 7, 2024
9ccd501
console: Fix table margins
kschiffer Aug 7, 2024
0efc4d1
Merge pull request #7225 from TheThingsNetwork/fix/sidebar-app-items
ryaplots Aug 8, 2024
09e07a4
console: Various styling fixes and tweaks
kschiffer Aug 7, 2024
06df0e6
console: Update notification messages
PavelJankoski Aug 8, 2024
e87f712
Merge pull request #7226 from TheThingsNetwork/fix/redesign-fixes-august
kschiffer Aug 8, 2024
7f1e595
Merge branch 'feature/console-redesign' into fix/e2e-tests
ryaplots Aug 8, 2024
c402e76
Merge branch 'refs/heads/feature/console-redesign' into fix/notificat…
PavelJankoski Aug 8, 2024
07223fb
console: Improve notification dropdown
PavelJankoski Aug 8, 2024
7878201
Merge pull request #7217 from TheThingsNetwork/fix/notifications
PavelJankoski Aug 8, 2024
ab1a036
Merge branch 'refs/heads/feature/console-redesign' into fix/e2e-tests
PavelJankoski Aug 8, 2024
cf236d8
console: Resolve conflicts
PavelJankoski Aug 8, 2024
ab2641a
dev: Skip account related tests
ryaplots Aug 9, 2024
d94a74e
dev: Intercept device model request
ryaplots Aug 9, 2024
60e77b0
Merge pull request #7210 from TheThingsNetwork/fix/e2e-tests
ryaplots Aug 9, 2024
d75f70a
console: Refactor datasheet to use flexbox and add responsive
ryaplots Aug 6, 2024
35b624c
console: Fix datasheet responsiveness
ryaplots Aug 8, 2024
2b9a738
console: End device header responsiveness
ryaplots Aug 8, 2024
ccdbd31
console: Other device responsiveness adjustments
ryaplots Aug 8, 2024
134e50c
console: Update responsiveness of map panel
ryaplots Aug 8, 2024
c5c5d08
console: Fix button height
ryaplots Aug 9, 2024
3568936
console: Fix merge
ryaplots Aug 9, 2024
5a4a33e
console: Update spacings
ryaplots Aug 9, 2024
03343db
console: Fix scrolling to top on page change
ryaplots Aug 12, 2024
7e59902
Merge pull request #7221 from TheThingsNetwork/fix/data-sheet-component
ryaplots Aug 13, 2024
44d9857
Merge pull request #7230 from TheThingsNetwork/fix/scroll-to-top
ryaplots Aug 13, 2024
3c94dba
console: Add height 100%
ryaplots Aug 13, 2024
48b1f9a
dev: Fix e2e test
ryaplots Aug 13, 2024
8252f56
console: Add back data test id
ryaplots Aug 13, 2024
8c98945
Merge pull request #7233 from TheThingsNetwork/fix/panel-height
ryaplots Aug 13, 2024
a346320
console: Fix app status badge when status url is present
kschiffer Aug 13, 2024
21c61bf
console: Backport LoRa Cloud integration naming change
kschiffer Aug 13, 2024
f6916b6
dev: Increase timeout for offline badge to disappear
kschiffer Aug 14, 2024
9b9443a
console: Fix gateway list view non admin
ryaplots Aug 14, 2024
c62c638
console: Remove connecting the events to the connection loss logic
ryaplots Aug 14, 2024
61b6708
console: Fix scrollbar vertical scroll behavior
kschiffer Aug 10, 2024
b93fc60
console: Move admin panel navigation to sidebar
kschiffer Aug 13, 2024
88410e2
console: Fix portalled modal crashes
kschiffer Aug 13, 2024
0cc2ef9
console: Separate logout and user store logic
kschiffer Aug 13, 2024
0b94981
console: Move user settings to Console
kschiffer Aug 13, 2024
01f64ac
console: Fix packet broker view crash when disabled
kschiffer Aug 13, 2024
4570c20
console: Move user session management to Console
kschiffer Aug 13, 2024
7983c09
console: Move oauth client authorization settings to Console
kschiffer Aug 13, 2024
55c330f
console: Move oauth client settings to Console
kschiffer Aug 13, 2024
de7c024
console: Fix faulty account app imports in console subtree
kschiffer Aug 13, 2024
a01593b
console: Fix right checking logic for oauth client views
kschiffer Aug 13, 2024
f6c4bb5
console: Fix right checking logic for user settings views
kschiffer Aug 13, 2024
0d41bc7
account: Remove sections that have been moved to the Console
kschiffer Aug 13, 2024
77b65e7
account: Add miscellaneous fixes
kschiffer Aug 13, 2024
2514799
account: Fix authorization screen
kschiffer Aug 13, 2024
96954c4
console: Fix error screens
kschiffer Aug 13, 2024
f52fc84
dev: Amend serve tool config for e2e
kschiffer Aug 13, 2024
c7a8945
dev: Fix and adjust end-to-end tests after refactor
kschiffer Aug 13, 2024
8e044dc
console: Add various styling fixes
kschiffer Aug 13, 2024
c766890
console: Update locales
kschiffer Aug 13, 2024
a2f964c
Merge pull request #7237 from TheThingsNetwork/fix/redesign-fixes-aug…
kschiffer Aug 14, 2024
f77b546
Merge pull request #7242 from TheThingsNetwork/changelog/v3.32.0
happyRip Aug 15, 2024
5dba81c
console: Fix profile dropdown path
ryaplots Aug 15, 2024
5b6e17e
account: Fix notification after revoking access
kschiffer Aug 15, 2024
82a0760
console: Fix error views
ryaplots Aug 15, 2024
af36fc8
console: Reactiovate account app tests
ryaplots Aug 15, 2024
a965c23
console: Fix error page headers
ryaplots Aug 15, 2024
7792970
dev: Remove duplicate test
ryaplots Aug 15, 2024
b0b38e4
Merge pull request #7244 from TheThingsNetwork/fix/error-view
ryaplots Aug 16, 2024
8601ebe
Merge pull request #7241 from TheThingsNetwork/fix/event-stream-conne…
ryaplots Aug 16, 2024
4819e6e
Merge remote-tracking branch 'origin/v3.32' into feature/console-rede…
kschiffer Aug 19, 2024
7fa5406
dev: Streamline cypress tests with enterprise
kschiffer Aug 16, 2024
af7a517
dev: Output console error in CI environments
kschiffer Aug 19, 2024
4fc9ebc
dev: Add cypress option to serve dev stack tool
kschiffer Aug 19, 2024
f0a332b
Merge pull request #7250 from TheThingsNetwork/fix/streamline-e2es
kschiffer Aug 19, 2024
780d05c
console: Enable end device creation quick action
ryaplots Aug 19, 2024
b632131
Merge pull request #7249 from TheThingsNetwork/fix/connect-add-device
kschiffer Aug 19, 2024
a8e9469
console: Works on second hover
ryaplots Aug 8, 2024
cdf8d9f
console: Change minimized sidebar
ryaplots Aug 12, 2024
09f6977
console: Add tooltip message
ryaplots Aug 12, 2024
a91edd0
console: Adjust sidebar logic
ryaplots Aug 13, 2024
0702e4a
console: Update locales
ryaplots Aug 13, 2024
1ca4276
console: Fix merge
ryaplots Aug 15, 2024
239c981
console: Improve sidebar behavior
kschiffer Aug 19, 2024
ebecfe3
console: Refactor sidebar context for better encapsulation
kschiffer Aug 19, 2024
1faaac0
console: Fix tooltip arrow placement
kschiffer Aug 19, 2024
9d59d4a
Merge pull request #7229 from TheThingsNetwork/fix/sidebar-hover-buttons
ryaplots Aug 20, 2024
f238b34
console: Restore lost changes to data sheet and overview headers
kschiffer Aug 20, 2024
a163225
dev: Adjust application overview tests
kschiffer Aug 20, 2024
81c175b
Merge pull request #7255 from TheThingsNetwork/fix/restore-7221
kschiffer Aug 20, 2024
1e0d6bf
console: Fix map panel
ryaplots Aug 20, 2024
6b7cded
console: Fix breakpoint
ryaplots Aug 20, 2024
d49a51a
Merge branch 'feature/gateway-integration' into feature/console-redesign
kschiffer Aug 20, 2024
9843f67
Merge pull request #7256 from TheThingsNetwork/merge/redesign-managed…
kschiffer Aug 20, 2024
c8837ec
console: Streamline upgrade button
ryaplots Aug 16, 2024
804d23b
console: Link right side of overview header
ryaplots Aug 16, 2024
483291b
console: Add tolltips to ambiguos icons
ryaplots Aug 16, 2024
9da6d5a
console: Add !importanto to all utilities
ryaplots Aug 16, 2024
4077800
console: Use different icons for each notifications
ryaplots Aug 16, 2024
0f93262
dev: Fix CI
ryaplots Aug 16, 2024
0e961cc
console: Fix merge
ryaplots Aug 20, 2024
5b0b30d
console: Fix lists in mobile
ryaplots Aug 20, 2024
d0f9b19
console: Fix smoke tests
ryaplots Aug 20, 2024
56b3ffb
console: Adjust breakpoints
ryaplots Aug 20, 2024
c9cf5b7
console: Fix icon props
ryaplots Aug 21, 2024
3703006
console: Fix entity names overflow
ryaplots Aug 21, 2024
8665590
console: Other layout fixes
ryaplots Aug 21, 2024
c40f4d1
console: Fix messages
ryaplots Aug 21, 2024
9753619
console: Reduce enterprise diff
kschiffer Aug 21, 2024
d5f291c
console: Add tooltip to button
ryaplots Aug 21, 2024
7520284
console: Fix table filters height on mobile
ryaplots Aug 21, 2024
fbe78ec
Merge pull request #7245 from TheThingsNetwork/fix/redesign-fixes-16aug
ryaplots Aug 21, 2024
6886fa0
console: Fix table layout and margins
kschiffer Aug 21, 2024
ce8f161
console: Improve tag styling and logic
kschiffer Aug 21, 2024
14ffbff
console: Add bookmark button tooltip for devices
kschiffer Aug 21, 2024
fa95c4b
account: Fix mobile login screen
kschiffer Aug 21, 2024
114a291
console: Add dropdown animation
kschiffer Aug 21, 2024
100e071
console: Fix dropdown logic
kschiffer Aug 21, 2024
8c3c9ec
console: Add missing tooltips
kschiffer Aug 21, 2024
707c03b
console: Disable password manager popups
kschiffer Aug 21, 2024
17d7e0b
console: Further improve responsiveness
kschiffer Aug 21, 2024
6c650e7
console: Use shortened noc link
kschiffer Aug 21, 2024
e8c6611
console: Fix wrong variable naming
kschiffer Aug 21, 2024
e5f0243
console: Refactor empty state logic for top entities panels
kschiffer Aug 21, 2024
ddfb206
console: Fill up top entities with recently created entities
kschiffer Aug 21, 2024
9976edd
console,account: Update locales
kschiffer Aug 21, 2024
1e9f6d9
console: Improve data sheet component
kschiffer Aug 22, 2024
938daed
Merge pull request #7258 from TheThingsNetwork/fix/redesign-fixes-0822
kschiffer Aug 22, 2024
d16f3e9
console: Number of notifications in dropdown
ryaplots Aug 22, 2024
1a91a29
dev: Prevent device panel from growing too much
kschiffer Aug 22, 2024
6bac673
console: Fix external links and in sidebar and fix layout
ryaplots Aug 22, 2024
b3462e1
console: Fix gateway status panel charts
ryaplots Aug 22, 2024
049ac9a
console: Fusther adjust chart
ryaplots Aug 22, 2024
d383f4d
console: Rever hight change
ryaplots Aug 22, 2024
4dfbf40
console: Fix duty cycle values
ryaplots Aug 22, 2024
70823c9
console: Fix table control not clickable
ryaplots Aug 22, 2024
25b1c10
console: Remove pagination margins
ryaplots Aug 22, 2024
e7adc4e
console: Fix table and pagination layout
kschiffer Aug 22, 2024
0a9a7ee
console: Fix sidebar resize behavior
kschiffer Aug 22, 2024
ec58e4c
console: Fix toast not disappearing
kschiffer Aug 22, 2024
c8a817d
console: Fix horizontal centering in user selects
kschiffer Aug 22, 2024
554542a
console: Fix event split open button placement
kschiffer Aug 22, 2024
460b1c4
console: Remove application id part of top end devices in app context
kschiffer Aug 22, 2024
4f67fca
dev: Fix js lint issue
kschiffer Aug 22, 2024
f51fd2b
console: Add fallback messages
ryaplots Aug 22, 2024
3eb3e1b
console: Change notification component name
ryaplots Aug 22, 2024
965c7ed
console: Use device response data to update app last seen
kschiffer Aug 22, 2024
00e950b
console: Resolve console warnings
kschiffer Aug 22, 2024
f19900c
dev: Fix merge
ryaplots Aug 23, 2024
67286b2
dev: Fix e2e test
ryaplots Aug 22, 2024
e46aa84
Merge pull request #7260 from TheThingsNetwork/merge/backport-ent-fixes
ryaplots Aug 26, 2024
9a70716
console: Make header logo clickable
kschiffer Aug 26, 2024
bfc7836
console: Improve search panel responsiveness
kschiffer Aug 26, 2024
832b9d1
console: Fix wrong tooltip message for hiding sidebar
kschiffer Aug 26, 2024
e6c2ba8
console: Fix sidebar transitions
kschiffer Aug 26, 2024
14ecfad
console: Update locales
kschiffer Aug 26, 2024
3c6edc0
console: Apply various fixes for the redesign
PavelJankoski Aug 26, 2024
79e2594
Merge pull request #7261 from TheThingsNetwork/fix/console-redesign-i…
kschiffer Aug 26, 2024
78e0bfd
Merge branch 'feature/console-redesign' into release/v3.32.0
kschiffer Aug 26, 2024
081d241
dev: Update copyright headers
kschiffer Aug 26, 2024
0186bfc
console: Make links in header context-safe
kschiffer Aug 26, 2024
4bbb72e
dev: Fix serve dev stack tool cypress setup
kschiffer Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
run: tools/bin/mage -v jsSDK:lint
- name: Lint frontend code
run: tools/bin/mage -v js:lint
- name: Lint stylus files
run: tools/bin/mage -v styl:lint
- name: Check for diff
run: tools/bin/mage git:diff

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
# Icon must end with two \r
Icon

# Except for everything in the icon component directory
!/pkg/webui/components/icon/

# Thumbnails
._*

Expand Down
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The line-height for `14px` font-size is `25px`, equaling `1.785rem`.

### Iconography

For the time being, we use [Google Material Icons](https://material.io/resources/icons), but are currently looking into an icon set that suits our needs better.
We are using [Tabler Icons](https://tablericons.com/) as our primary icon set. It is a free and open source icon set that is designed to be used in web applications.

![Icons](https://user-images.githubusercontent.com/5710611/77132143-ae040780-6aa1-11ea-9560-de6ae8f4e315.png)

Expand Down
39 changes: 39 additions & 0 deletions config/.stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
extends:
- 'stylelint-stylus/standard'
rules:
color-no-hex: true
color-named: 'never'
declaration-no-important: true
stylus/at-rule-no-unknown: true
stylus/property-no-unknown: true
stylus/selector-type-no-unknown: true
stylus/at-extend-style: null
stylus/at-rule-empty-line-before: null
stylus/at-rule-name-space-after: null
stylus/block-closing-brace-empty-line-before: null
stylus/block-closing-brace-newline-after: null
stylus/block-closing-brace-newline-before: 'always-multi-line'
stylus/block-opening-brace-newline-after: 'always-multi-line'
stylus/block-opening-brace-space-after: 'always-single-line'
stylus/block-opening-brace-space-before: 'always'
stylus/color-hex-case: 'upper'
stylus/declaration-colon: 'always'
stylus/hash-object-property-comma: 'always'
stylus/indentation: 2
stylus/media-feature-colon: 'always'
stylus/no-at-require: null
stylus/no-eol-whitespace: true
stylus/number-leading-zero: 'never'
stylus/number-no-trailing-zeros: true
stylus/pythonic: 'always'
stylus/selector-list-comma: 'always'
stylus/selector-list-comma-newline-after: 'always-multi-line'
stylus/selector-list-comma-space-after: 'always-single-line'
stylus/selector-list-comma-space-before: 'never'
stylus/selector-pseudo-class-case: 'lower'
stylus/semicolon: 'never'
stylus/single-line-comment-double-slash-space-after: 'always'
stylus/single-line-comment-no-empty: null
stylus/single-line-comment:
- 'always'
- style: 'double-slash'
3 changes: 2 additions & 1 deletion config/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ module.exports = defineConfig({

return configWithPermissions
},
scrollBehavior: 'center',
experimentalRunAllSpecs: true,
excludeSpecPattern: '!*.spec.js',
excludeSpecPattern: ['!*.spec.js'],
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
asBaseUrl: 'http://localhost:1885/api/v3',
Expand Down
2 changes: 2 additions & 0 deletions config/eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ rules:
react/forbid-foreign-prop-types: off
# Prevent undefined components.
react/jsx-no-undef: warn
# Allow arrow functions as props
react/jsx-no-bind: off
# Prevent vague prop types.
react/forbid-prop-types:
- warn
Expand Down
18 changes: 13 additions & 5 deletions config/storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@
/* eslint-disable import/no-commonjs */

module.exports = {
stories: ['../../pkg/webui/**/story.js', '../../pkg/webui/**/*.stories.js'],
addons: ['@storybook/addon-actions'],
staticDirs: ['../../public'],

framework: {
name: '@storybook/react-webpack5',
options: {},
},

stories: [
'../../pkg/webui/**/story.js',
'../../pkg/webui/**/*.stories.js',
'../../pkg/webui/**/*.mdx',
'../../pkg/webui/**/*stories.mdx',
],
addons: [
'@storybook/addon-actions',
'@storybook/addon-essentials',
'@storybook/addon-mdx-gfm',
'@storybook/addon-designs',
],
staticDirs: ['../../public'],
docs: {
autodocs: true,
},
Expand Down
19 changes: 6 additions & 13 deletions config/storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
/* eslint-disable import/prefer-default-export */

import React from 'react'
import { Provider } from 'react-redux'
import { IntlProvider } from 'react-intl'
import { createMemoryHistory } from 'history'
import { MemoryRouter } from 'react-router-dom'

import messages from '@ttn-lw/locales/en.json'
Expand All @@ -26,21 +24,16 @@ import backendMessages from '@ttn-lw/locales/.backend/en.json'
import '../../pkg/webui/styles/main.styl'
import '../../pkg/webui/styles/utilities/general.styl'
import '../../pkg/webui/styles/utilities/spacing.styl'
import '../../pkg/webui/styles/utilities/tokens.styl'
import 'focus-visible/dist/focus-visible'
import createStore from './store'
import Center from './center'

const history = createMemoryHistory()
const store = createStore(history)

export const decorators = [
Story => (
<Provider store={store}>
<IntlProvider key="key" messages={{ ...messages, ...backendMessages }} locale="en-US">
<MemoryRouter>
<Center>{Story()}</Center>
</MemoryRouter>
</IntlProvider>
</Provider>
<IntlProvider key="key" messages={{ ...messages, ...backendMessages }} locale="en-US">
<MemoryRouter>
<Center>{Story()}</Center>
</MemoryRouter>
</IntlProvider>
),
]
21 changes: 19 additions & 2 deletions config/storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

/* eslint-env node */
/* eslint-disable import/no-commonjs */
import fs from 'fs'
import path from 'path'

const MiniCssExtractPlugin = require('mini-css-extract-plugin')
require('@babel/register')

Expand All @@ -22,9 +25,16 @@ const { default: bundleConfig, styleConfig } = require('../webpack.config.babel'
// List of allowed plugins.
const allow = [MiniCssExtractPlugin]

const { CONTEXT = '.' } = process.env
const context = path.resolve(CONTEXT)
const supportedLocales = fs
.readdirSync(path.resolve(context, 'pkg/webui/locales'))
.filter(fn => fn.endsWith('.json'))
.map(fn => fn.split('.')[0])

module.exports = async ({ config, mode }) => {
const webpack = require('webpack')
if (mode === 'PRODUCTION') {
const webpack = require('webpack')
allow.push(webpack.DllReferencePlugin)
}

Expand All @@ -37,6 +47,7 @@ module.exports = async ({ config, mode }) => {
const cfg = {
...config,
resolve: {
fallback: { crypto: false },
alias: {
...config.resolve.alias,
...bundleConfig.resolve.alias,
Expand All @@ -57,7 +68,13 @@ module.exports = async ({ config, mode }) => {
styleConfig,
],
},
plugins: [...config.plugins, ...filteredPlugins],
plugins: [
...config.plugins,
...filteredPlugins,
new webpack.DefinePlugin({
'process.predefined.SUPPORTED_LOCALES': JSON.stringify(supportedLocales),
}),
],
}

return cfg
Expand Down
8 changes: 4 additions & 4 deletions config/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { CleanWebpackPlugin } from 'clean-webpack-plugin'
import ShellPlugin from 'webpack-shell-plugin'
import CopyWebpackPlugin from 'copy-webpack-plugin'
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin'
import nib from 'nib'

import pjson from '../package.json'

Expand All @@ -41,6 +40,7 @@ const {
PUBLIC_DIR = 'public',
NODE_ENV = 'production',
MAGE = 'tools/bin/mage',
CI = false,
} = process.env

const WEBPACK_IS_DEV_SERVER_BUILD = process.env.WEBPACK_IS_DEV_SERVER_BUILD === 'true'
Expand Down Expand Up @@ -136,7 +136,7 @@ export const styleConfig = {
modules: {
exportLocalsConvention: 'camelCase',
localIdentName: env({
production: '[hash:base64:10]',
production: '[hash:base64:4]',
development: '[local]-[hash:base64:4]',
}),
},
Expand All @@ -147,7 +147,6 @@ export const styleConfig = {
options: {
stylusOptions: {
import: [path.resolve(context, 'pkg/webui/styles/include.styl')],
use: nib(),
},
},
},
Expand Down Expand Up @@ -258,7 +257,7 @@ export default {
},
},
{
test: /\.(woff|woff2|ttf|eot|jpg|jpeg|png|svg)$/i,
test: /\.(woff|woff2|ttf|eot|otf|jpg|jpeg|png|svg)$/i,
type: 'asset/resource',
generator: {
filename: '[name].[contenthash:20][ext]',
Expand All @@ -284,6 +283,7 @@ export default {
all: [
new webpack.EnvironmentPlugin({
NODE_ENV,
CI,
VERSION: version,
REVISION: revision,
ADDITIONAL_CONFIG: JSON.stringify(ADDITIONAL_CONFIG),
Expand Down
63 changes: 51 additions & 12 deletions cypress/e2e/account/authorization.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,73 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const user = {
ids: { user_id: 'create-app-test-user' },
primary_email_address: '[email protected]',
password: 'ABCDefg123!',
password_confirm: 'ABCDefg123!',
}

describe('Account App authorization view', () => {
before(() => {
beforeEach(() => {
cy.dropAndSeedDatabase()
cy.createUser(user)
})

it('displays UI elements in place', () => {
const user = {
ids: { user_id: 'create-app-test-user' },
primary_email_address: '[email protected]',
password: 'ABCDefg123!',
password_confirm: 'ABCDefg123!',
}

cy.createUser(user)
cy.visitConsoleAuthorizationScreen({ user_id: user.ids.user_id, password: user.password })

// Check authorization screen.
cy.visitConsoleAuthorizationScreen({ user_id: user.ids.user_id, password: user.password })
cy.location('pathname').should('contain', `${Cypress.config('accountAppRootPath')}/authorize`)
cy.findByTestId('full-error-view').should('not.exist')
cy.findByText('Request for permission').should('be.visible')
cy.findByText('Console').should('be.visible')
cy.findByText('All possible rights', { exact: false }).should('be.visible')
cy.findByText('all possible current and future rights').should('be.visible')
cy.findByText(`You are logged in as ${user.ids.user_id}.`).should('be.visible')
cy.findByText(/You are logged in as/).should('be.visible')
cy.findByText(user.ids.user_id).should('be.visible')
cy.findByText(
`You will be redirected to ${Cypress.config('consoleRootPath')}/oauth/callback`,
).should('be.visible')
cy.findByRole('button', { name: /Cancel/ }).should('be.visible')
cy.findByRole('button', { name: /Authorize Console/ }).should('be.visible')
})

it('succeeds manually authorizing Account App clients', () => {
// Set Console client's `skip_authorization` flag to false.
cy.task('execSql', `UPDATE clients SET skip_authorization=false WHERE client_id='console';`)
cy.visit(Cypress.config('consoleRootPath'))

// Login.
cy.findByLabelText('User ID').type(user.ids.user_id)
cy.findByLabelText('Password').type(user.password)
cy.findByRole('button', { name: 'Login' }).click()

// Authorize.
cy.location('pathname').should('contain', `${Cypress.config('accountAppRootPath')}/authorize`)
cy.findByRole('button', { name: /Authorize Console/ }).click()

// Check Console landing view.
cy.location('pathname').should('eq', `${Cypress.config('consoleRootPath')}/`)
cy.findByTestId('full-error-view').should('not.exist')
})

it('succeeds manually aborting Account App client authorization', () => {
// Set Console client's `skip_authorization` flag to false.
cy.task('execSql', `UPDATE clients SET skip_authorization=false WHERE client_id='console';`)
cy.visit(Cypress.config('consoleRootPath'))

// Login.
cy.findByLabelText('User ID').type(user.ids.user_id)
cy.findByLabelText('Password').type(user.password)
cy.findByRole('button', { name: 'Login' }).click()

// Deny authorization.
cy.location('pathname').should('contain', `${Cypress.config('accountAppRootPath')}/authorize`)
cy.findByRole('button', { name: /Cancel/ }).click()

// Check Console error.
cy.location('pathname').should('eq', `${Cypress.config('consoleRootPath')}/oauth/callback`)
cy.findByTestId('full-error-view').should('exist')
cy.findByText(/Login failed/).should('be.visible')
})
})
Loading
Loading