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

Data limits UI #554

Merged
merged 11 commits into from
Feb 3, 2020
Merged

Data limits UI #554

merged 11 commits into from
Feb 3, 2020

Conversation

alalamav
Copy link
Contributor

@alalamav alalamav commented Jan 9, 2020

  • Implements the user interface to configure access key data transfer limits on the Outline Manager app. The feature is currently an experiment, which is why we have a new section in the server settings.

Screen Shot 2020-01-09 at 1 31 58 PM

Screen Shot 2020-01-09 at 1 32 51 PM

  • When data limits are enabled, the access key usage display becomes relative to the limit. Displays a tooltip on hover. Re-styles the data usage progress bar.

Screen Shot 2020-01-09 at 1 34 20 PM

  • Displays a notification to direct the user to the feature for existing servers upon updating the app, or when opening the app for a second time for new servers.

Screen Shot 2020-01-09 at 1 21 51 PM

  • Minor improvements: whitespace removal, turns nested Promise code into async/await, re-styles the help bubbles.

@alalamav alalamav self-assigned this Jan 9, 2020
src/server_manager/messages/en.json Show resolved Hide resolved
paper-input, paper-textarea, paper-dropdown-menu {
--paper-input-container-focus-color: var(--primary-green);
paper-dropdown-menu {
width: 100%;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we switch this with the definition in cloud-install-styles?

Copy link
Contributor Author

@alalamav alalamav Jan 15, 2020

Choose a reason for hiding this comment

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

We only want width: 100% on the feedback form dropdowns, not the one I'm adding for data limit units.

src/server_manager/web_app/app.ts Outdated Show resolved Hide resolved
src/server_manager/web_app/app.ts Outdated Show resolved Hide resolved
src/server_manager/web_app/app.ts Outdated Show resolved Hide resolved
console.error(`Failed to set access key data limit: ${error}`);
this.appRoot.showError(this.appRoot.localize('error-set-data-limit'));
serverView.accessKeyDataLimit = this.dataLimitToDisplayDataAmount(
previousLimit || await this.computeDefaultAccessKeyDataLimit(this.selectedServer));
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it's cleaner if we call this.computeDefaultAccessKeyDataLimit(this.selectedServer, await this.selectedServer.listAccessKeys()) here and make the second parameter required. Or alternatively get rid of the second parameter completely and call listAccessKeys() twice above

src/server_manager/messages/en.json Outdated Show resolved Hide resolved
src/server_manager/model/server.ts Show resolved Hide resolved
src/server_manager/web_app/app.ts Show resolved Hide resolved
src/server_manager/ui_components/outline-server-view.html Outdated Show resolved Hide resolved
src/server_manager/ui_components/outline-server-view.html Outdated Show resolved Hide resolved
src/server_manager/web_app/app.ts Outdated Show resolved Hide resolved
src/server_manager/web_app/app.ts Outdated Show resolved Hide resolved
src/server_manager/web_app/app.ts Outdated Show resolved Hide resolved
@fortuna fortuna self-requested a review January 22, 2020 23:41
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

I noticed that we are reverting back to a toggle, rather than checkbox. Why is that?
Toggle is not a desktop pattern. Example:
image

@thelonious89
Copy link

UI and initial feature looks great and I look forward to testing~

Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

Thanks for adding the feature!!

@alalamav
Copy link
Contributor Author

alalamav commented Jan 31, 2020

@JonathanDCohen, I merged your changes (63748f4). Tested that the hostname and data limits features are working as intended. Fixed a small UI issue where non-editable hostnames were getting cropped (b1e295b):

Screen Shot 2020-01-30 at 7 16 39 PM

5206d2f and 33eedf1 were UI/UX fixes that resulted from a bug bash with the design team.

Please take a quick look so I can merge.

@cjhenck
Copy link

cjhenck commented Jan 31, 2020

The strings LGTM.

@alalamav alalamav merged commit e1a772e into master Feb 3, 2020
@alalamav alalamav deleted the alalama-data-limits-ui branch February 3, 2020 21:21
@ercxar
Copy link

ercxar commented Mar 3, 2020

It looks awesome. Thank you.
I would also like to be able to set a different allotment for each user instead of a given limit for all users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants