<div dir="ltr"><div>I think the table setup pattern have some opportunity for reducing code duplication before it gets re-used by other panels..  <br></div><div><br></div><div>We used to just need to write one file to define a table, now we have to write 9 files [1].  Can we have a table directive to reduce the duplicated code before moving forward to other panels?</div><div><br></div><div>-Lin</div><div><br></div><div>[1] <a href="https://github.com/openstack/horizon/tree/master/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table">https://github.com/openstack/horizon/tree/master/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 11:49 AM, Thai Q Tran <span dir="ltr"><<a href="mailto:tqtran@us.ibm.com" target="_blank">tqtran@us.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">Hi everyone,<div><br></div><div>Just wanted to keep everyone up to date on the angular panels work. The goal was to set a pattern that others can follow, to that end, there were a few requirements:</div><div>1. reusable and possibly pluggable</div><div>2. easy to understand</div><div>3. reduce code duplication</div><div><br></div><div>These requirements don't always go hand-in-hand, and that is the primary reason why it is taking a bit longer. I believe we are nearing the end of it, here are some items remaining that I believe is crucial to finishing up this work.</div><div><br></div><div>a. i18n was completed, so we need help moving gettext blobs to HTML templates (example patch: <a href="https://review.openstack.org/#/c/210366/" target="_blank">https://review.openstack.org/#/c/210366/</a> ) volunteers are welcomed! We want others to use the translate directive as the main way to translate text blobs, this was why we went down this road using babel and angular_extractor plugin.</div><div><br></div><div>b. transfer table supports clone feature ( <a href="https://review.openstack.org/#/c/211345/" target="_blank">https://review.openstack.org/#/c/211345/</a> ). There were a lot of template duplications, this clone feature reduces the HTML by a considerable amount. Since this is something we use quite often, it made sense to invest time into improving it. We have had complaints that there was too much HTML fragments, this will address a bit of that. One of the challenge was to get it working with existing launch-instance, so I spent about 2 weeks making sure it worked well with the old code while allowing the new clone feature.</div><div><br></div><div>c. I believe we have a pretty good pattern setup for tables. The final piece of the puzzle was the patterns for various actions. We have wizard (create user), form (edit user), confirmation dialog (delete user), and actions with no modal dialog (enable user). We wanted a general pattern that would address the requirements mentioned above. There were some discussions around extensibility at the midcycle that I think will fit well here as well ( <a href="https://blueprints.launchpad.net/horizon/+spec/angular-workflow-plugin" target="_blank">https://blueprints.launchpad.net/horizon/+spec/angular-workflow-plugin</a> ). The actions can follow a similar pattern to workflow. I believe this pattern would address #1 and #3 but making it easy to understand is a bit challenging - I think this is where documentation could help. </div><div><br></div><div><a href="https://review.openstack.org/#/c/202315/" target="_blank">https://review.openstack.org/#/c/202315/</a> and a few other patches are going to be ready for review soon (sometime end of this week)! <span style="font-size:12.8000001907349px">Item #c is the most important piece, it is going to be the general pattern that people will use to build their angular panels with, so the more eyes we can get on it, the better. </span><span style="font-size:12.8000001907349px">My aim is to get it in before the feature freeze and I think that is entirely possible with your help. So please help review even if you are not a core!</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks</span></div><div><br></div><div><br></div></font><br>


<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>