XBlock Settings service configuration for support urls and timeout, JS vars cleanup/refactor#55
Conversation
Easier to deal with in JS. Handle support_email set to None prior to default change to empty str
Use configurable timeout seconds in waiting message
Improve support link styling
waiting...the timeout message has the proper support info
briandant
left a comment
There was a problem hiding this comment.
I'm good with this. Thanks for these great changes. Just a couple questions that I'll leave to you to resolve, optionally change, and merge at will.
I'm stealing some of your patterns here for the universal lab launcher that I'm building.
On that topic, soon we'll have to come together to make some changes to this XBlock. We're going to enhance the API ...
| 'js_class': 'LaunchContainerXBlock' | ||
| } | ||
| } | ||
| DEFAULT_SUPPORT_URL = '/help' |
There was a problem hiding this comment.
Do we have customer docs to explain how this will work? "By default, your support URL will be /help. Please configure the URL at X location in your settings." I'm wondering about the case where a site does not have a support page. Perhaps having some mechanism to not post the support URL if it's blank?
There was a problem hiding this comment.
Thanks @briandant - This makes me think that the best thing is to actually put help text on the support_email field which explains that an email overrrides a support url, and tells what the support_url is set to. I'll add a commit with that to this PR.
| @property | ||
| def timeout_secs(self): | ||
| lcsettings = self.get_xblock_settings() | ||
| return lcsettings.get('timeout_seconds', DEFAULT_LAUNCHER_TIMEOUT_SECONDS) |
There was a problem hiding this comment.
Did you test the experience when this timeout is shorter than the timeout configured in AVL. e.g., the timeout here is 60 seconds but the lab actually launches in 75 seconds.
There was a problem hiding this comment.
No, actually. I'll double check but the most harm that would be done is that a "Lab taking too long to load?" message would appear, then the lab would still load. I don't imagine we would ever configure a very short timeout or bother configuring this at the platform level, unless for a scenario like a conference where we just wanted to bump the default 120 seconds up a little bit temporarily due to high volume.
| #launcher_submit:disabled, #launcher_submit[disabled] { | ||
| color: rgba(0, 0, 0, 0.8); | ||
| } | ||
|
|
There was a problem hiding this comment.
Thanks for cleaning up these styles 👍 💯
|
While I've got you, @bryanlandia, could you please tell me your development workflow for this XBlock? I presume you run edX locally instead of merely the xblock-sdk. I need to get my edX environment setup, more generally speaking. Can you point me to some docs for a dev env? |
True, I didn't use the XBlock-SDK! I tested locally using tox to run unit tests, and developed in my ISC Juniper Devstack and then ahem did some final testing and fixing on a preproduction server up on GCP using good ol ssh and runserver with a breakpoint 😬 . Take a look at https://github.com/appsembler/sultan/, Ahmed's tool for GCP-based devstack setup. You can find a devstack image at https://console.cloud.google.com/compute/imagesDetail/projects/appsembler-devstack-30/global/images/devstack-juniper?project=appsembler-devstack-30 Ask Anders if you need access to that. |
2b73bd3
|
I re-requested reviews since the repo policy makes me. I just pushed one commit with the updated support email text. |

Change description
Use the XBlock Settings service to support platform-level configuration of support urls and launch timeout seconds.
A bunch of refactoring and cleanup of spaghetti JS code for status and error messages
Settings default to those in use for Appsembler Tahoe (timeout at 120 seconds, support url /help)
Features are a response to customer request (ISC) to use custom feedback page for support url. Configurable timeout seconds just seemed useful, especially for development/testing.
Also drops Python 2.7 support since all customers will be on Juniper+... preps release 3.0.0.
Type of change
Related issues
https://appsembler.atlassian.net/browse/RED-2278
https://appsembler.atlassian.net/browse/BLACK-245
Checklists
Development
Security
Code review