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

Login - 2.x Review #222

Closed
18 tasks done
jniles opened this issue Mar 27, 2016 · 6 comments · Fixed by #378
Closed
18 tasks done

Login - 2.x Review #222

jniles opened this issue Mar 27, 2016 · 6 comments · Fixed by #378
Assignees
Labels

Comments

@jniles
Copy link
Collaborator

jniles commented Mar 27, 2016

This issue documents the updates to the bhima login page that need to be made before the page is up to bhima-2.X standards.

App Structure/css
  • Login form should be centered vertically on any screen size (using vh css properties)
  • Login Form should be centered vertically in line with the sidebar, not the screen vertical center.
  • Redesign the panel-heading for clearer login message
  • Remove duplicate text on the login page introduced in Lang #283 and Refactoring the fr.json and en.json #197.
  • Login form should expand to full screen on small screen size.
Form Validation
  • Login form should clearly distinguish between server-sent errors and client side errors.
  • Find a better place for "Forgot your password?" text.
End-to-End Tests
  • Write tests to demonstrate the following capabilities:
    • Login to a particular project (assert that the project name is correct)
    • Page Refresh retains login
    • Login and Logout, page refresh retains logout
    • Invalid username/password credentials display informative errors
Error Handling
  • Application errors (no enterprises, no projects, etc) should be CLEARLY put above the login form, perhaps disabling the login capabilities. These should be checked when the application starts. Use growl-notifications introduced in (Feature) Notification service #370
  • Errors from HTTP should be CLEARLY displays above the login form, along with appropriate translations and error codes. Use growl-notifications introduced in (Feature) Notification service #370
  • Form errors should be displayed beneath the form and prompt the user to resubmit with different credentials.
Cache
  • The login form should remember (and select) the last project used on that computer.
Documentation
  • Code should produce a readable JSDoc document for future reference.
Service Architecture
  • Login/Logout functionality should exist in a separate service, not in the Login controller itself.

With these improvements, the Login Form should be pretty close to bhima-2.x's standards.

@jniles jniles added this to the 2.x Process milestone Mar 27, 2016
jniles referenced this issue in jniles/bhima Mar 30, 2016
This commit implements some of the requested changes from #222.  In
particular, the following have landed:
 1. The login panel positioning is a little bit better centered.
 2. The login/logout methods have been moved into the SessionService,
 which stores session information in the local $sessionStorage.
 3. The panel header buttons are slightly clearer.
 4. The login form remembers which project was logged in.

Most importantly, the LoginController is now more focused, removing
extraneous services such as `$location`, `$timeout` and `appstate`.
jniles referenced this issue in jniles/bhima Mar 30, 2016
This commit implements some of the requested changes from #222.  In
particular, the following have landed:
 1. The login panel positioning is a little bit better centered.
 2. The login/logout methods have been moved into the SessionService,
 which stores session information in the local $sessionStorage.
 3. The panel header buttons are slightly clearer.
 4. The login form remembers which project was logged in.

Most importantly, the LoginController is now more focused, removing
extraneous services such as `$location`, `$timeout` and `appstate`.
@jniles
Copy link
Collaborator Author

jniles commented May 4, 2016

Note: updates on 4/5/2016.

@sfount
Copy link
Contributor

sfount commented May 4, 2016

The updates here LGTM - this would be a logical component to tackle first.

The ideas for error handling sound very useful 👍

@jniles jniles self-assigned this May 4, 2016
@jniles
Copy link
Collaborator Author

jniles commented May 4, 2016

Alright, I'll tackle this today.

@jniles
Copy link
Collaborator Author

jniles commented May 4, 2016

Critical bug - the URL navigation still works when the user doesn't have a session. Steps to reproduce:

  1. Load the login page.
  2. Type #/settings into the URL.
  3. Observe that while the URL reset to #/login, you will be looking at the Settings page.

@sfount
Copy link
Contributor

sfount commented May 4, 2016

Interesting - that must mean the only redirect that actually works is on an unauthenticated HTTP request. The settings page only makes a request to /languages which happens to be defined as a public route so it doesn't throw the error causing a redirect.

Most of the other pages do!

jniles referenced this issue in jniles/bhima May 4, 2016
This commit addresses two issues reported in #222:
 1. The duplicate text on the login panel has been removed.
 2. The tree cannot be expanded when the user does not have a session.
jniles referenced this issue in jniles/bhima May 4, 2016
This commit cleans up the auth/login messages by moving server-sent
error messages into `growl-notification` service.  It also exposes a new
method on the `NotifyService` called `fatal()` to signal fatal errors
using the same colorscheme as `NotifyService.handleError()`.  The name
fatal was chosen to encourage developers NOT to use this, except in
very rare cases.  The `danger()` method should be preferred in almost
all scenarios.

This commit also adds the `NotifyService` into the `SessionService` to
display welcome and goodbye messages on login/logout events.

This brings us closer to finishing #222, closing all error handling and
text-related issues.
@jniles
Copy link
Collaborator Author

jniles commented May 4, 2016

Yes, I found the bug and fixed it in jniles@fe8ed51. It was a fairly easy fix - we had not updated our session safeguards for $state-based routing, which knows nothing of the URL. Now, we use the $state to redirect in case the URL is invalid... Slightly hard-coded, but good enough for now, I think.

I'll write some end-to-end tests and confirm that everything behaves as expected before sending in a pull request.

jniles referenced this issue in jniles/bhima May 4, 2016
This commit ensures that $state.go() doesn't get to `/login` when the
user already has a session logged in.  Since $state-based and URL-based
routing are decoupled in bhima, we need to two checks to make sure the
URL is correctly displayed (and doesn't transition) and the $state is
correctly blocked and doesn't transition.

Fixes bugs reported in #222.
jniles referenced this issue in jniles/bhima May 4, 2016
The login procedure has been completely polished with notifications,
better error handling, translated text, and a centered panel.  All bugs
related to the tree and/or navigation have been squashed.  This is ready
for a 2.x review and approval by the team.

End-to-end tests have been written to future-proof the behavior of the
module.  Tests have been written for every case discussed in #222 and
bugs found along the way.

The breakpoints have been adjusted so that the login form nicely renders
on all default responsive devices included in the chrome dev tools.

Decisions, such as welcome messages, should be reviewed by the team.

Closes #222.
jniles referenced this issue in jniles/bhima May 4, 2016
This commit addresses two issues reported in #222:
 1. The duplicate text on the login panel has been removed.
 2. The tree cannot be expanded when the user does not have a session.
jniles referenced this issue in jniles/bhima May 4, 2016
This commit cleans up the auth/login messages by moving server-sent
error messages into `growl-notification` service.  It also exposes a new
method on the `NotifyService` called `fatal()` to signal fatal errors
using the same colorscheme as `NotifyService.handleError()`.  The name
fatal was chosen to encourage developers NOT to use this, except in
very rare cases.  The `danger()` method should be preferred in almost
all scenarios.

This commit also adds the `NotifyService` into the `SessionService` to
display welcome and goodbye messages on login/logout events.

This brings us closer to finishing #222, closing all error handling and
text-related issues.
jniles referenced this issue in jniles/bhima May 4, 2016
This commit ensures that $state.go() doesn't get to `/login` when the
user already has a session logged in.  Since $state-based and URL-based
routing are decoupled in bhima, we need to two checks to make sure the
URL is correctly displayed (and doesn't transition) and the $state is
correctly blocked and doesn't transition.

Fixes bugs reported in #222.
jniles referenced this issue in jniles/bhima May 4, 2016
The login procedure has been completely polished with notifications,
better error handling, translated text, and a centered panel.  All bugs
related to the tree and/or navigation have been squashed.  This is ready
for a 2.x review and approval by the team.

End-to-end tests have been written to future-proof the behavior of the
module.  Tests have been written for every case discussed in #222 and
bugs found along the way.

The breakpoints have been adjusted so that the login form nicely renders
on all default responsive devices included in the chrome dev tools.

Decisions, such as welcome messages, should be reviewed by the team.

Closes #222.
jniles referenced this issue in jniles/bhima May 5, 2016
This commit addresses two issues reported in #222:
 1. The duplicate text on the login panel has been removed.
 2. The tree cannot be expanded when the user does not have a session.
jniles referenced this issue in jniles/bhima May 5, 2016
This commit cleans up the auth/login messages by moving server-sent
error messages into `growl-notification` service.  It also exposes a new
method on the `NotifyService` called `fatal()` to signal fatal errors
using the same colorscheme as `NotifyService.handleError()`.  The name
fatal was chosen to encourage developers NOT to use this, except in
very rare cases.  The `danger()` method should be preferred in almost
all scenarios.

This commit also adds the `NotifyService` into the `SessionService` to
display welcome and goodbye messages on login/logout events.

This brings us closer to finishing #222, closing all error handling and
text-related issues.
jniles referenced this issue in jniles/bhima May 5, 2016
This commit ensures that $state.go() doesn't get to `/login` when the
user already has a session logged in.  Since $state-based and URL-based
routing are decoupled in bhima, we need to two checks to make sure the
URL is correctly displayed (and doesn't transition) and the $state is
correctly blocked and doesn't transition.

Fixes bugs reported in #222.
jniles referenced this issue in jniles/bhima May 5, 2016
The login procedure has been completely polished with notifications,
better error handling, translated text, and a centered panel.  All bugs
related to the tree and/or navigation have been squashed.  This is ready
for a 2.x review and approval by the team.

End-to-end tests have been written to future-proof the behavior of the
module.  Tests have been written for every case discussed in #222 and
bugs found along the way.

The breakpoints have been adjusted so that the login form nicely renders
on all default responsive devices included in the chrome dev tools.

Decisions, such as welcome messages, should be reviewed by the team.

Closes #222.
bors bot added a commit that referenced this issue Feb 4, 2018
2483: Update dotenv to the latest version 🚀 r=jniles a=greenkeeper[bot]


## Version **5.0.0** of [dotenv](https://github.com/motdotla/dotenv) was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </td>
    <td>
      dotenv
    </td>
  </tr>
  <tr>
    <th align=left>
      Current Version
    </td>
    <td>
      4.0.0
    </td>
  </tr>
  <tr>
    <th align=left>
      Type
    </td>
    <td>
      dependency
    </td>
  </tr>
</table>

The version **5.0.0** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of dotenv.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Commits</summary>
<p>The new version differs by 11 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/472db2e026a3b7ced5dbc6b2f2704a1e81ab1bca"><code>472db2e</code></a> <code>5.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/95aa929a1dae749c204edfb3ce3df99490a77a24"><code>95aa929</code></a> <code>use explicit full path to form more informative error messages (#237)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/6b07ace96fc39c865d4a2a60809eb0b97474e92b"><code>6b07ace</code></a> <code>Merge pull request #255 from SpainTrain/patch-1</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/e76794018101f5a8deb3ebf21b2e10705023dd60"><code>e767940</code></a> <code>README: link to dotenv-webpack project</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/62a2afb2cbaa7dce6d02751f7f135b839d765f04"><code>62a2afb</code></a> <code>Linking to run.env in README (#246)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/46ec97ddbfbf3eea83586c8cdabb7888c345f973"><code>46ec97d</code></a> <code>Merge pull request #235 from RodrigoEspinosa/patch-1</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/ce68a75bf67e1c7c7cdc1639c2ac66d0a840adee"><code>ce68a75</code></a> <code>Add link to lookenv in README</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/40e9efcdc5495966d46540fefe786e8d2425b4b1"><code>40e9efc</code></a> <code>Shaved a few bytes off by removing a ternary. (#222)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/bf06a9c47677711ccd1549a77b092beb729fa2e4"><code>bf06a9c</code></a> <code>Improve documentation (#207)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/25bf5ad8f5cfbb419e299c208d95e1169643ad89"><code>25bf5ad</code></a> <code>do not override set vars with falsy values (#203)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/825c1b221e80c3fedb61d36abc077851abde94d2"><code>825c1b2</code></a> <code>Syntax highlighting for .env content in README (#167)</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/motdotla/dotenv/compare/fdd0923e82e12a6e29b65898990201857141e75d...472db2e026a3b7ced5dbc6b2f2704a1e81ab1bca">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>


---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
bors bot added a commit that referenced this issue Feb 4, 2018
2483: Update dotenv to the latest version 🚀 r=jniles a=greenkeeper[bot]


## Version **5.0.0** of [dotenv](https://github.com/motdotla/dotenv) was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </td>
    <td>
      dotenv
    </td>
  </tr>
  <tr>
    <th align=left>
      Current Version
    </td>
    <td>
      4.0.0
    </td>
  </tr>
  <tr>
    <th align=left>
      Type
    </td>
    <td>
      dependency
    </td>
  </tr>
</table>

The version **5.0.0** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of dotenv.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Commits</summary>
<p>The new version differs by 11 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/472db2e026a3b7ced5dbc6b2f2704a1e81ab1bca"><code>472db2e</code></a> <code>5.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/95aa929a1dae749c204edfb3ce3df99490a77a24"><code>95aa929</code></a> <code>use explicit full path to form more informative error messages (#237)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/6b07ace96fc39c865d4a2a60809eb0b97474e92b"><code>6b07ace</code></a> <code>Merge pull request #255 from SpainTrain/patch-1</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/e76794018101f5a8deb3ebf21b2e10705023dd60"><code>e767940</code></a> <code>README: link to dotenv-webpack project</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/62a2afb2cbaa7dce6d02751f7f135b839d765f04"><code>62a2afb</code></a> <code>Linking to run.env in README (#246)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/46ec97ddbfbf3eea83586c8cdabb7888c345f973"><code>46ec97d</code></a> <code>Merge pull request #235 from RodrigoEspinosa/patch-1</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/ce68a75bf67e1c7c7cdc1639c2ac66d0a840adee"><code>ce68a75</code></a> <code>Add link to lookenv in README</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/40e9efcdc5495966d46540fefe786e8d2425b4b1"><code>40e9efc</code></a> <code>Shaved a few bytes off by removing a ternary. (#222)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/bf06a9c47677711ccd1549a77b092beb729fa2e4"><code>bf06a9c</code></a> <code>Improve documentation (#207)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/25bf5ad8f5cfbb419e299c208d95e1169643ad89"><code>25bf5ad</code></a> <code>do not override set vars with falsy values (#203)</code></li>
<li><a href="https://urls.greenkeeper.io/motdotla/dotenv/commit/825c1b221e80c3fedb61d36abc077851abde94d2"><code>825c1b2</code></a> <code>Syntax highlighting for .env content in README (#167)</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/motdotla/dotenv/compare/fdd0923e82e12a6e29b65898990201857141e75d...472db2e026a3b7ced5dbc6b2f2704a1e81ab1bca">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>


---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
bors bot added a commit that referenced this issue Sep 23, 2018
3193: Update snyk to the latest version 🚀 r=jniles a=greenkeeper[bot]


## The dependency [snyk](https://github.com/snyk/snyk) was updated from `1.97.0` to `1.97.1`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

<details>
<summary>Release Notes for v1.97.1</summary>

<h2><a href="https://urls.greenkeeper.io/snyk/snyk/compare/v1.97.0...v1.97.1">1.97.1</a> (2018-09-23)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>bump needle to ^2.2.4 to fix bug with node 8.12.0 (<a href="https://urls.greenkeeper.io/snyk/snyk/commit/79a8992">79a8992</a>)</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 2 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/142379bc77669be1387eef821f1c8779b3638b3f"><code>142379b</code></a> <code>Merge pull request #222 from snyk/fix/bump-needle</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/79a8992c8a604078aedc023c5edef72d731c8de2"><code>79a8992</code></a> <code>fix: bump needle to ^2.2.4 to fix bug with node 8.12.0</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/snyk/snyk/compare/0f961666e96af4d34d4cd3e388b1af88dcc73a31...142379bc77669be1387eef821f1c8779b3638b3f">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
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 a pull request may close this issue.

2 participants