apostrophecms-legacy / apostrophe-schemas

DEPRECATED - FOR APOSTROPHE 0.5 SITES ONLY - BUILT IN TO APOSTROPHE 2.X. Allows any object to have a schema of properties that can be edited in the browser, sanitized on the server and easily saved in Mongo. Schema types include text, select, tags, Apostrophe areas and singletons, and joins (one-to-one and many-to-many relationships), among others.
MIT License
3 stars 3 forks source link

Collapse arrays #10

Closed jth- closed 8 years ago

jth- commented 8 years ago

Array items now hide all but their first field by default. The +/- button allows for expansion or closing of those fields. Focusing the first field results in expanding the item. New items are expanded by default.

@jsumnersmith

jth- commented 8 years ago

I've added a minimize option to the array field type in order to declare whether an array should autohide fields.

If the minimize option is not selected, I hide the +/- button, because it serves no purpose.

I've tested this with nested arrays and that also works without a hitch, I made sure to only use findSafe so as to avoid nested weirdness.

I've also updated the documentation of Arrays in Schemas accordingly.

@boutell @jsumnersmith Let me know if either of you have any further feedback.

jsumnersmith commented 8 years ago

Looks :100: @boutell please give this your stamp of Tom-proval before we merge it.

boutell commented 8 years ago

How well has this been tested with minimize not turned on? If I read the CSS right, it's going to be always collapsed when minimize is not turned on in the schema...

jth- commented 8 years ago

@boutell In the javascript, if minimize isn't truthy then it expands all of the array elements.

boutell commented 8 years ago

Ah, there it is. Cool.

On Tue, Jan 19, 2016 at 5:27 PM, Jimmy Harrison notifications@github.com wrote:

@boutell https://github.com/boutell In the javascript, if minimize isn't truthy then it expands all of the array elements.

— Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe-schemas/pull/10#issuecomment-173008258 .

THOMAS BOUTELL, DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell commented 8 years ago

Please port to 0.6 before we forget.

jth- commented 8 years ago

Given the plans for the new array editor, is this pertinent in 0.6?

boutell commented 8 years ago

Good point On Jan 19, 2016 5:30 PM, "Jimmy Harrison" notifications@github.com wrote:

Given the plans for the new array editor, is this pertinent in 0.6?

— Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe-schemas/pull/10#issuecomment-173008903 .