Render the sign-in/sign-out button in the Dashboard header using Ajax#4723
Conversation
|
@laurel This is the change to render the user header using ajax as we discussed. |
There was a problem hiding this comment.
I think we usually use $ for jQuery
|
LGTM except for minor style comments and it looks like some tests for the user menu should be changed to test ApiController#user_menu instead of HomeController#index |
|
Laurel, please see whether the stylesheet changes I made look good. I will check with you in person about the tests to update. |
|
I moved the appropriate tests to api_controller_test. I also added tests to make sure the menu renders the correct "sign in" and "sign out" links based on the sign in state. |
|
I added back in the hack to fixed levels configured with an invalid base url (host name but no leading '//') so now all levels are rendering as expected. |
|
LGTM. The UI test for the signin button that I just added may be relevant to this change: I made it chrome only because other browsers were having problems with state between scenarios (the browser's cache I think?). It would be interesting to see if these things magically go away when it is ajaxified. It currently works on Chrome and Firefox. |
Render the sign-in/sign-out button in the Dashboard header using Ajax
|
Eyes tests showed some layout issue and cross-test state contamination, so I'm going to roll this back for investigation. |
16bc449 Merge pull request #4903 from code-dot-org/only_setup_local_pegasus_db (philbogle) 7460930 Merge pull request #4911 from code-dot-org/remerge-project-expect-channel (Josh Lory) 4907658 Merge pull request #4915 from code-dot-org/revert-4723-ajax_sign_in (philbogle) c266d62 Revert "Render the sign-in/sign-out button in the Dashboard header using Ajax" (philbogle) 0dc2fb9 Header (and 'Remix' button) doesn't show up on mobile [ci skip] (Josh Lory) 7317599 Merge pull request #4913 from code-dot-org/all-responses (Laurel) 9ac35c2 Merge pull request #4723 from code-dot-org/ajax_sign_in (philbogle)
224dc67 Merge pull request #4786 from code-dot-org/pulse-item (Brad Buchanan) d619792 Automatically built. (Continuous Integration) 8403a32 Merge pull request #4920 from code-dot-org/testfixes (Elijah Hamovitz) 0ff348c Temporarily removing funOMeter test (Elijah Hamovitz) b457e24 Merge pull request #4916 from code-dot-org/ie10tests (Bjvanminnen) 5b89e35 more IE10 (Brent Van Minnen) 1876a7f o Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging (Trevor Berg) 541fdc5 Fix issues with JSONFileDataAdapter (Trevor Berg) 0f13914 iOS requires directly-bound click events and 'cursor: pointer' style for click events to work (Elijah Hamovitz) 5b6b40f Feature-check SVG filter support before creating/applying a filter. (Brad Buchanan) 656f7c2 Merge pull request #4877 from code-dot-org/bundle_install_frontends (Will Jordan) b7be14d Automatically built. (Continuous Integration) 16bc449 Merge pull request #4903 from code-dot-org/only_setup_local_pegasus_db (philbogle) 7460930 Merge pull request #4911 from code-dot-org/remerge-project-expect-channel (Josh Lory) f53452b start running applab tests on IE 10 (Brent Van Minnen) 4907658 Merge pull request #4915 from code-dot-org/revert-4723-ajax_sign_in (philbogle) c266d62 Revert "Render the sign-in/sign-out button in the Dashboard header using Ajax" (philbogle) 0dc2fb9 Header (and 'Remix' button) doesn't show up on mobile [ci skip] (Josh Lory) 7317599 Merge pull request #4913 from code-dot-org/all-responses (Laurel) 3130e6c Merge remote-tracking branch 'origin/staging' into pulse-item (Brad Buchanan) e28f355 Deduplicate functions and remove last SMIL TODO comment. (Brad Buchanan) 9ac35c2 Merge pull request #4723 from code-dot-org/ajax_sign_in (philbogle)
We now render the user header containing the sign-in/sign-out button in the Dashboard header using Ajax. This is the same Ajax action used for rendering the button in Pegasus. Ajax rendering allows the user header to be rendered correctly for signed in users even in publicly cached pages.
Testing