fieldset, legend, label, etc in hydra edit views

5 views
Skip to first unread message

Matt Zumwalt

unread,
Apr 10, 2011, 9:27:05 PM4/10/11
to hydra-...@lists.stanford.edu, hydr...@googlegroups.com
[cross-posting to hydrus and hydra-ui lists]

While working on HYDRUS-151 (Metadata Editing Forms work without Javascript), I noticed that the hydrangea_articles edit view has been changed pretty heavily in Libra (and thus in the current hydrangea master branch). On the upside, it looks nicer and more polished.  On the downside, it does not always use html labels properly.  Also the usage of fieldset, legend, and label tags is inconsistent between different areas of the page (depending on how they wanted to style things, the same tags are used to present different info)

In contrast, if you look at a hydrangea_dataset edit view, you will see the html structures that we settled on for Hydrangea Beta1, which aren't perfect but are much more consistent and hone more closely to the suggested usage of these tags.

How should we address this?  Should we remove all of the custom stuff in hydrangea_articles edit views, making the form look less polished?  Alternatively, should we fix the custom stuff to adhere to some conventions?  What are those conventions?  Where will they be documented for the next developers who touch this code?

Should we write helpers that codify these conventions?

Matt Zumwalt
MediaShelf, LLC




Joseph Gilbert

unread,
Apr 10, 2011, 11:17:42 PM4/10/11
to hydr...@googlegroups.com, hydra-...@lists.stanford.edu
Hi Matt,

I agree that the inconsistency with the fieldset, legend, and label elements is unfortunate.  This issue, though, precedes UVa's development work on Libra (see, for example: http://bit.ly/e7Sood ).  I've worked around these inconsistencies for the past few releases to focus on core missing bits of functionality, but will be taking it on in the next round of development (HYLIBRA-188, for instance).  Stay tuned for improvements in this area!

Best,
Joe

--
Joseph Gilbert
Web Developer, Public Services
Consultant, Scholars' Lab
University of Virginia Library

Garrick Van Buren

unread,
Apr 10, 2011, 11:30:02 PM4/10/11
to hydr...@googlegroups.com, hydra-...@lists.stanford.edu
Assuming all content types used within a specific Hydra head need to look similar to each other, and that any given Hydra head may introduce new content types - my initial thought  is to create a metadata view helper that wraps presentation specific markup around the existing metadata helpers. 

Something where, rather than having to specify, a label, an link, and the field all 3 could be passed as options to a single helper, e.g.

hydra_metadata_block('topic', :text_field, :multiple, :edit)

This would help maintain the required markup was rendered for all content types and make it easy to customize for any given Hydra head implementation and make it easy to generate the views for new content types.

--
Garrick.

jcmeloni

unread,
Apr 11, 2011, 9:01:11 AM4/11/11
to Hydra-UI
Matt, et al -

Popping in late to the conversation to make this statement clear: We
(in Libra-land) are still working with what we were given originally
for the most part, and have not completed our sweep of inconsistent
usage of standard HTML, JavaScript and general design principles.

In NO WAY does the code that you see actually reflect "depending on
how they wanted to style things". How we want to style things is
completely consistently, which is not what exists at this time.

As I've noted before, once we are finished with actually making the
thing work, we will be contributing lovely, clean, valid code back to
everyone.

- Julie


On Apr 10, 11:30 pm, Garrick Van Buren

Jennifer Vine

unread,
Apr 11, 2011, 1:27:50 PM4/11/11
to Meloni, Julie (jcm7sb), hydr...@googlegroups.com, hydra-...@lists.stanford.edu
I'd be really surprised if the Hydrangea HTML were consistent, given the iterative way in which it reached its current state. And as I recall, it has more HTML than it needs. I like the idea of lovely, clean, valid... smells like fresh linen...  

JV

On 2011-04-11, at 6:00 AM, Meloni, Julie (jcm7sb) wrote:

Matt, et al –
 
Popping in late to the conversation to make this statement clear:  We (in Libra-land) are still working with what we were given originally for the most part, and have not completed our sweep of inconsistent usage of standard HTML, JavaScript and general design principles. 
 
In NO WAY does the code that you see actually reflect “depending on how they wanted to style things”.  How we want to style things is completely consistently, which is not what exists at this time.
 
As I’ve noted before, once we are finished with actually making the thing work, we will be contributing lovely, clean, valid code back to everyone.
 
- Julie
 
 
_______________________________________________
hydra-hydrus mailing list
hydra-...@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/hydra-hydrus

Reply all
Reply to author
Forward
0 new messages