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

Display custom welcome message for admins. #5529

Conversation

mrpau-eugene
Copy link
Contributor

@mrpau-eugene mrpau-eugene commented Oct 21, 2017

Summary

Displays a custom welcome message to the admin after their first login, given that they modify the ~/.kalite/settings.py first..

image

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

  • Has documentation been written/updated?
  • Have you written release notes for the upcoming release?

Issues addressed

#5522

@codecov
Copy link

codecov bot commented Oct 21, 2017

Codecov Report

Merging #5529 into 0.17.x will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           0.17.x    #5529      +/-   ##
==========================================
+ Coverage   62.77%   62.79%   +0.01%     
==========================================
  Files         117      117              
  Lines        6555     6558       +3     
==========================================
+ Hits         4115     4118       +3     
  Misses       2440     2440
Impacted Files Coverage Δ
kalite/distributed/custom_context_processors.py 100% <ø> (ø) ⬆️
kalite/facility/api_resources.py 95.31% <100%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f862026...b2e7a0a. Read the comment docs.

@benjaoming
Copy link
Contributor

benjaoming commented Oct 23, 2017

Great work!

We need to write a custom welcome message that isn't about RACHEL, I'll get a hold of the imps team and request that they write it, since they might be opinionated about it.

First draft:

Need help?

KA Lite is community-driven and relies on help and experience which you can both share and receive in our community.

  • Offline help: Use the "Docs" button in the top menu to get help

Online help:

Notice that the URLs of the links appear in the text -- this is on purpose.

@jamalex
Copy link
Member

jamalex commented Oct 23, 2017

Are we going to show this message unconditionally, whether or not they have internet? Given the fact that most RACHEL usage is totally offline (and doesn't need to go online for setup, as the videos are preloaded), would it be better to frame the message differently if no internet is available and the links won't work?

For the default (non-RACHEL) admin login, there's a greater chance the first install will be online (to load videos), but still not necessarily the case.

@laurenlichtman
Copy link

laurenlichtman commented Oct 23, 2017

I'm not sure if we need a RACHEL-specific version. One of the reasons we did this was to also learn about how people are using KA Lite and/or add it to the map. I've added LE so it makes sense "why LE" is in the links. @jamalex I made a small edit to address your concern. Open to thoughts.

Suggested edit cc: @jeepurs:

You are running an instance of KA Lite, developed by the edtech nonprofit organization, Learning Equality. KA Lite is community-driven and relies on help and experience from our online community.

@benjaoming
Copy link
Contributor

benjaoming commented Oct 23, 2017

@laurenlichtman

I'm not sure if we need a RACHEL-specific version.

It's configurable, so anyone can setup their own welcome message... RACHEL was the specific case for this because of a concern that we get a lot of RACHEL-specific support questions, so we'll ask them to customize this message in their devices.

@benjaoming
Copy link
Contributor

@jamalex

would it be better to frame the message differently if no internet is available and the links won't work

That's why the URLs are displayed - regardless, we are only showing the message on the first login. Deployments with preseeded databases might have already set the flag so the message doesn't get displayed.

@benjaoming
Copy link
Contributor

Made some amendments to above suggestion...

@jamalex changed the text so it's addressing both on and offline scenarios

@laurenlichtman I've added the map as the first item, it should totally be there, thanks

@jeepurs
Copy link
Contributor

jeepurs commented Oct 23, 2017

@benjaoming does that mean the default is non-RACHEL and that the RACHEL users will have to configure it?

It's configurable, so anyone can setup their own welcome message

@benjaoming
Copy link
Contributor

benjaoming commented Oct 26, 2017

@jeepurs

@benjaoming does that mean the default is non-RACHEL and that the RACHEL users will have to configure it?

Yes -- just not the RACHEL users per say, but the pre-configuration that RACHEL ships with should contain a different welcome message that they decide and design for their wishes.

benjaoming and others added 2 commits October 30, 2017 19:26
…ified-login-does-not-work-if-more-than-1000-users

Set max_limit to 0 in order to fetch all users.
@mrpau-eugene
Copy link
Contributor Author

@benjaoming is this supposed to be the default message for non-RACHEL users?

Need help?

KA Lite is community-driven and relies on help and experience which you can both share and receive in our community.

  • Offline help: Use the "Docs" button in the top menu to get help

Online help:

@benjaoming
Copy link
Contributor

@benjaoming is this supposed to be the default message for non-RACHEL users?

Yes, but I think you should make Offline help a sub-heading, too, so it aligns with Online help

@benjaoming
Copy link
Contributor

Seems like something weird happened with the version history, making it a bit hard to review.

@mrpau-eugene could you:

  1. Create a new PR with a fresh branch off from current 0.17.x ?
  2. Introduce your changes from your old feature branch as a single commit? See: https://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit
  3. Move the default KALITE_WELCOME_MESSAGE to kalite.project.base ?

@benjaoming benjaoming closed this Nov 14, 2017
@mrpau-eugene mrpau-eugene deleted the feature/5522-configurable-welcome-message-for-superusers branch November 16, 2017 01:01
@laurenlichtman
Copy link

@benjaoming any action needed from me on this? Would like to flag to the WP team when it's ready. Thanks!

@benjaoming
Copy link
Contributor

@laurenlichtman - good call, yes the action item would be to advice about using the new configuration in RACHEL. It's not out yet because of another bug. Will get back once released!

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.

None yet

5 participants