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 account dropdown to the refresh container #129

Closed
wants to merge 22 commits into from

Conversation

asebastian-r7
Copy link
Contributor

@asebastian-r7 asebastian-r7 commented Aug 7, 2019

This PR introduces a minor UI improvement which allows switching accounts from the refresh page. It adds a dropdown button at the top of the refresh page, populated with your accounts. Select your account from the dropdown and you are redirected through select-role and back to the refresh page.

Note that this doesn't actually reduce the amount of clicks you have to perform, it just streamlines the process and - for me - feels a lot smoother. It feels like less of a context switch. This is also the groundwork for switching your role directly from the refresh page. Coming soon.

I preemptively created a release and cask so I can continue to merge to master until concurrent account support is complete.

Could not for the life of me get the value of req.params.account
when using an optional path parameter. This change switches over
to using query parameters. Not ideal, so i'll loop back around
and try to get /refresh/:account? working.
We read in and parse the metadata file from disk, then pass it in
to the refresh container as a property. This is not ideal, but from
what I can see the `Storage` object only contains the current account
at least while in the refresh route. Might loop back around and
see about getting all account metadata in and out of `Storage`.
Having a seperate api endpoint for switching accounts was a bad
idea. Turns out we can just use the existing `POST /configure`.
Not particularly happy with the dangling comma lint fixes on
imports. We seem to have been pretty consistent with not having
trailing commas on import blocks. Need this to pass tests though
so they are happening.
Extracted most of the account switch button into its own component.
There is still some left over code in the parent component.
Specifically the submitConfigure function is currently passed into
the new AccountSwitch function. Ideally, I would like to see this
imported straight into the AccountSwitch sub-component. Binding
the action has proved difficult.
No idea why `Storage.get('metadataUrls')` was only returning one
account when I did my first pass. Nevertheless they are all there.
Filesystem read has been replaced with a `Storage.get`.
Not sure why this passes linting locally but not on travis, oh
well.
@coveralls
Copy link

coveralls commented Aug 7, 2019

Coverage Status

Coverage remained the same at 90.625% when pulling 18c89dc on add-account-dropdown into 5a2b43e on master.

@dgreene-r7
Copy link
Contributor

I'll take a look as soon as I get the chance. In the meantime do you mind updating the changelog file with the 2.2.0 changes?

@asebastian-r7
Copy link
Contributor Author

Updated changelog, thanks for the reminder!

@mmurrell-r7 mmurrell-r7 deleted the add-account-dropdown branch July 18, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants