New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype properties ordering behavior and select fix. #2389

wants to merge 2 commits into
base: master


None yet
2 participants

braincomb commented Jan 6, 2013

Hi all,

This is more or less two issues (behavior+fix) in one which I believe are related.

Firstly, there is a bug in product properties when selecting a prototype. It will only populate the last field and the rest of the fields will be blank. We just needed to change :last to :first selector.

Secondly, when creating a new prototype and populating them with properties, then updating (saving), the order in which they were added will be lost and they will be ordered by name. IMHO, this defeats the purpose of prototype properties, as most people will want to have them in a particular order as they were added, especially if there are many of them. So I removed the name order for properties, and also added some sorting logic to select.js.erb so that they are properly populated in the correct order.

I am not sure if this is an elegant fix, but it has been working perfectly for me, and I believe makes it more consistent in behavior.

Looking forward to feedback on this.


@radar radar closed this in bbfe9b2 Jan 8, 2013

radar added a commit that referenced this pull request Jan 8, 2013

Removed unnecessary scope and its call. Properties will be populated …
…by order in which they were created to improve UX. Renamed id argument to prop + small coding style change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment