cozy / cozy-proxy

This repository was part of CozyV2 which has been deprecated - Cozy authentication and routing layer
https://blog.cozycloud.cc/post/2016/11/21/On-the-road-to-Cozy-version-3
GNU Affero General Public License v3.0
26 stars 31 forks source link

Add access to MyAccounts after Accounts onboarding step #345

Closed gregorylegarec closed 7 years ago

gregorylegarec commented 7 years ago

Thanks to have a review @CPatchane

In this PR :

Use of COZY_MYACCOUNTS_URL environment variable

If this environment variable is set, cozy-proxy use it as MyAccounts URL. Set to /app/konnectors by default. This variable will allow us to efficiently test locally during development and test, without dealing with URL management headache. Just run cozy-proxy with this command :

$> PORT=9555 COZY_MYACCOUNTS_URL="http://localhost:9358" npm run watch

Improve base view

To easily allow a full-screen iframe without using a dirty position: absolute (ping @m4dz), the base view has been a little bit revamped to have its <main /> element now using the full width and height of the viewport. Its previous CSS properties has been reported into a dedicated .step-wrapper element. Side effect : agreement and infos views are upside down but we don't care for now.

Use a new Marionette view for MyAccounts iframe

Instead of a hackish tweak in the Accounts step view for switching to MyAccounts, I prefered to use a brand new Marionnette View. I used Marionnette's clever event bubbling mechanism to make the Application listening to the Accounts view and show the MyAccounts iframe when needed.

Using elegant flexbox to display the iframe in full-size

It speaks by itself. Have a look at the CSS. It's so beautiful. Poke @m4dz.

gregorylegarec commented 7 years ago

Thanks for your feedback on typos @CPatchane, they're fixed now.

CPatchane commented 7 years ago

Thanks @gregorylegarec