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

Add banner to DeviceBrowser when device limit reached #2670

Merged
merged 5 commits into from
Aug 31, 2023

Conversation

knolleary
Copy link
Member

Description

This is part of the Team Types work. It adds the standard banner to the DeviceBrowser component and disabled the 'add device' button if the device limit has been reached.

Except... it doesn't quite work yet. Given the work around Device pagination, the DeviceBrowser is getting a bunch of rework in parallel. The current code doesn't appear to have the 'total number of devices in this team' baked into it. If I go about adding that, it'll insta-clash badly with the pagination work. So this is a placeholder PR to get the bulk of this work in - and the final piece can be updated when the pagination work lands.

Alternatively, if the pagination work is delayed, it will be a quick task to add the right logic here and get this merged and deal with the clashes later.

@knolleary knolleary changed the base branch from main to 2531-team-types-bug-fixes August 29, 2023 15:21
@knolleary knolleary requested a review from Pezmc August 29, 2023 15:21
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #2670 (e80f1d0) into main (ce04cd5) will increase coverage by 0.09%.
The diff coverage is 0.00%.

❗ Current head e80f1d0 differs from pull request most recent head e682c34. Consider uploading reports for the commit e682c34 to get more accurate results

@@            Coverage Diff             @@
##             main    #2670      +/-   ##
==========================================
+ Coverage   39.69%   39.78%   +0.09%     
==========================================
  Files         539      535       -4     
  Lines       18993    18790     -203     
  Branches     4465     4408      -57     
==========================================
- Hits         7539     7476      -63     
+ Misses      11454    11314     -140     
Flag Coverage Δ
backend 74.90% <ø> (+0.14%) ⬆️
frontend 2.17% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
frontend/src/components/DevicesBrowser.vue 0.00% <0.00%> (ø)

... and 22 files with indirect coverage changes

Base automatically changed from 2531-team-types-bug-fixes to main August 30, 2023 06:17
@Pezmc
Copy link
Contributor

Pezmc commented Aug 30, 2023

My branch has total number of devices in a Vue data prop, so indeed will be easy to grab!

@Pezmc
Copy link
Contributor

Pezmc commented Aug 30, 2023

Can be rebased on top of #2677 and use allDeviceStatuses.size() (on the team devices page). Will need an API call on the application/instance pages.

@Pezmc Pezmc force-pushed the 2531-improve-device-limit-ux branch from e80f1d0 to e682c34 Compare August 31, 2023 09:53
Copy link
Contributor

@Pezmc Pezmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by @knolleary on release call.

@knolleary
Copy link
Member Author

Reviewed the additional changes from @Pezmc - happy to merge

@Pezmc Pezmc merged commit 28e0d38 into main Aug 31, 2023
3 of 4 checks passed
@Pezmc Pezmc deleted the 2531-improve-device-limit-ux branch August 31, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants