refs FOO-1166
* don't randomly sample from an array that's likely already usefully
ordered
* re-write sub_account recursive stuff so that a relation can be used,
and then use that relation to preload brand_configs, and to select
only necessary columns
* fix a bunch of callbacks so that you can actually save a slim
account object
* pass in an account/sharedbrandconfig object when we have one already,
instead of force reloading
Change-Id: Ia14b539617f338be507e7773da7ef9bc3907ec4c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257443
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes FOO-1166
so that the query for sub-accounts is not synchronous to the request
this should be api-compatible with the old method of one progress
object per sub account
note that sub-account themes are no longer generated in parallel,
so this may be a little bit slower than before. if it's an issue,
additional work may be required
test plan:
* have an account with lots of sub accounts
* edit and apply a theme
* progress bar shoould show correctly
* the theme should be applied to all sub accounts
Change-Id: I8c2fb4f38e72783052eaa0440072b6c8bd25bea8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257004
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-33934
so that they can't run out of order
Change-Id: I6f8c0e680a20b2b78828818447e0d72899d01ee6
Reviewed-on: https://gerrit.instructure.com/116253
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-28289
this enables theme editor to work as a virtual "parent" account for root
account themes, but only root accounts on the same shard as the site
admin account. this is a limitation we hope to remove in the future,
but replicating the site admin theme to all shards is going to be
significantly more complicated.
test plan:
- create a mixture of root accounts on the same shard as site admin and
different shards
- regression test theme editor in siteadmin. it should act as a parent
for same-shard accounts and not interact with different-shard accounts
Change-Id: Ia7e3e1a8adbb7bc2e49b2d9b5ef3b4d30cf4c581
Reviewed-on: https://gerrit.instructure.com/82000
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
fixes: CNVS-29805
test plan:
* apply a theme to an account
* pick the "default theme" card
* make no changes
* the save button should disabled with a
"you have not set any custom values..." message
* you should be able to click the apply button
* you should now be looking at the "default theme"
* window.ENV.active_brand_config should be null
Change-Id: I362d8fde96faf0ebceed12e4c0560532a6e4e5b7
Reviewed-on: https://gerrit.instructure.com/81765
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fixes: CNVS-28400
test plan:
test 1.
for root account with unbranded child but branded
grandchild. aka:
When you have Acct (with Theme A) ->
Sub Acct (with no theme) ->
Sub Sub Account (with theme B),
and update Theme A, Theme B is not updated to inherit
from the new A.
* start with root no brand config, child no brand
* create a theme for grandchild with red buttons
and js file with "console.log('from grandchild')"
* go to root. set a theme with blue nav bg &
js file with "console.log('from root')"
* you should see progress for generating grandchild
when you hit "save"
* go to page in grandchild. buttons should be red,
nav bg should be blue. js console should have
"from root" logged first, then "from grandchild"
test 2:
* create a bunch of saved themes in child and grandchild
* save a new theme to "root"
* when any of the saved themes are applied they
should be based on the new root's theme (use
colors and console.log's to verify)
Change-Id: Ic9dbeea1524034ef60b758398eca30bc019aa32e
Reviewed-on: https://gerrit.instructure.com/79739
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>