https://dev.arvados.org/https://dev.arvados.org/favicon.ico?15576888422014-03-05T14:31:28ZArvadosArvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=84152014-03-05T14:31:28ZWard Vandewegeward@curii.com
<ul><li><strong>Target version</strong> changed from <i>2014-04-16 Dev tools and data/resource management</i> to <i>2014-03-26 Debt service and dev painkillers</i></li></ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=84172014-03-05T14:35:05ZWard Vandewegeward@curii.com
<ul><li><strong>Subject</strong> changed from <i>Admin can run setup-new-user.rb with a nice form from workbench</i> to <i>Admin can run setup-new-user.rb equivalent with a nice form from workbench</i></li></ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=84262014-03-05T14:47:47ZWard Vandewegeward@curii.com
<ul><li><strong>Assigned To</strong> set to <i>Radhika Chippada</i></li></ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=89482014-03-26T14:08:12ZTom Cleggtom@curii.com
<ul><li><strong>Target version</strong> changed from <i>2014-03-26 Debt service and dev painkillers</i> to <i>2014-04-16 Dev tools and data/resource management</i></li></ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=90772014-03-27T16:26:28ZTom Cleggtom@curii.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/9077/diff?detail_id=6970">diff</a>)</li></ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=93092014-04-07T09:14:27ZTom Cleggtom@curii.com
<ul></ul><p>I haven't had a chance to look at the code yet, but here are notes on the UI:</p>
<ul>
<li>Use modal-header and modal-footer classes for title & buttons, like example at <a class="external" href="http://getbootstrap.com/javascript/#modals">http://getbootstrap.com/javascript/#modals</a></li>
<li>Looks a bit odd while loading the dialog content. Perhaps at least put a min-height on the box so it's not just a slit, and ideally say "Loading..." somehow. (Dialog title?)</li>
<li>If you open the dialog, fill in some form fields, cancel, then re-open, the previous form input values appear for a moment until the new dialog content is reloaded. Should probably be reset to blank instead.</li>
<li>Above center would be OK but below center looks a bit odd. Is this because the dialog is centered before the content is loaded? If it's easier than centering it, something like top=1/4 window height would probably work.</li>
<li>Get rid of vertical scroll bar</li>
<li>Cancel button should be btn-default, not btn-primary</li>
<li>Use form styles/structure like <a class="external" href="http://getbootstrap.com/css/#forms">http://getbootstrap.com/css/#forms</a></li>
</ul>
<p>I added a branch 2272-setup-user-in-workbench-TC to add notes to apps/workbench/README about getting capybara-webkit/phantomjs to work. Consider merging that into your 2272 branch?</p> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=93142014-04-07T10:31:06ZTom Cleggtom@curii.com
<ul></ul>More notes
<ul>
<li>Argh. Is it really worth incorporating into our project some code whose licence is "subject to the licensee inflecting a positive message unto someone"? <a class="external" href="http://licence.visualidiot.com/">http://licence.visualidiot.com/</a> (For that matter, what value does bootstrap-modal.css.scss provide for us that Bootstrap3 doesn't do?)</li>
<li>Possible fixes for some of the above complaints:
<ul>
<li>put the "open modal" code in user_setup.js.erb after updating the div content, instead of using data-toggle in _show_admin.html.erb. Like <a class="external" href="http://richonrails.com/articles/basic-ajax-in-ruby-on-rails">http://richonrails.com/articles/basic-ajax-in-ruby-on-rails</a> (should avoid showing dialog with stale/empty content)</li>
<li>Bootstrap says "Always try to place a modal's HTML code in a top-level position in your document" (might help positioning)</li>
</ul></li>
</ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=93342014-04-08T01:58:27ZTom Cleggtom@curii.com
<ul></ul>I pushed an updated 2272-setup-user-in-workbench-TC branch with my suggestions for using default styles and letting Bootstrap work its magic:
<ul>
<li>Removed the bootstrap-modal.css file</li>
<li>Moved the modal div into a footer_html section so it goes into the top level of the DOM like Bootstrap recommends (otherwise everything was being rendered strangely because it was inside a blockquote, etc.)</li>
<li>Used the div structure from the Bootstrap modal docs (.modal .modal-dialog .modal-content .modal-header/body/footer)</li>
<li>Used the form structure from the Bootstrap form docs (.form-group input.form-control)</li>
</ul>
<p>IMO the result looks way better, and (perhaps more importantly) it will automatically get better instead of worse when we move to a non-default Bootstrap theme.</p>
Other
<ul>
<li>Noticed a small bug with validation: if you paste a valid email address, it doesn't trigger "keyup" so the javascript doesn't revalidate. (You can use <code>$(selector).on('keyup paste', function(){...})</code> to fire on multiple events.)</li>
<li>Instead of using <script> tags, it's a bit nicer to put javascript code in a <code><% content_for :js do %></code> block (or <code>:footer_js</code> to put it at the bottom of the HTML so the DOM already exists by the time it runs).</li>
<li>Some whitespace complaints. (See <code>git diff --check master...2272-setup-user-in-workbench</code>) You can tell git not to commit these -- <a class="external" href="https://arvados.org/projects/arvados/wiki/Coding_Standards#Git-setup">https://arvados.org/projects/arvados/wiki/Coding_Standards#Git-setup</a></li>
<li>Before merge, rebase so our git history doesn't have the weird-licensed code that we didn't end up using</li>
<li>Set proper email address in your git configuration → <a class="external" href="https://arvados.org/projects/arvados/wiki/Coding_Standards#Git-commits">https://arvados.org/projects/arvados/wiki/Coding_Standards#Git-commits</a></li>
</ul> Arvados - Feature #2272: Admin can run setup-new-user.rb equivalent with a nice form from workbenchhttps://dev.arvados.org/issues/2272?journal_id=93772014-04-09T13:36:56ZTom Cleggtom@curii.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul>