Skip to content

Fix wrapping section numbers in law listings #307

Closed

Description

@waldoj

When the section number is too long to fit in the left column on a law listing, it breaks and occupies a second line. This throws off the layout and the float of the next law, resulting in them stacking up:

wrap

I've seen it cascade when there's a series of long section numbers, and it's rather a mess.

It seems to me that the ideal solution would be one that would allow that left column to collectively flex, to expand to the width of the widest section number in the list. But I appreciate that might be impractical, in which case a decent backup option would be to have the list handle more gracefully when that text wraps (just as when laws' catch lines are too long, which works great). And, of course, there's always the option of simply making that first column wider, but I don't know that we want to make every code's layout based on the longest possible section number in any legal code that we can find. :)

Activity

  1. ghost assigned on Jun 6, 2013
  2. jathayde commented on Jun 6, 2013

    @jathayde
    Member

    Agreed. flexing would be ideal. Do you have a worst case example? Sometimes, it's better to plan for it to go to two lines and handle that as well, but in this case, these are short enough that we should flex the left column out.

    On Jun 6, 2013, at 5:17 PM, Waldo Jaquith [email protected] wrote:

    When the section number is too long to fit in the left column on a law listing, it breaks and occupies a second line. This throws off the layout and the float of the next law, resulting in them stacking up:

    I've seen it cascade when there's a series of long section numbers, and it's rather a mess.

    It seems to me that the ideal solution would be one that would allow that left column to collectively flex, to expand to the width of the widest section number in the list. But I appreciate that might be impractical, in which case a decent backup option would be to have the list handle more gracefully when that text wraps (just as when laws' catch lines are too long, which works great). And, of course, there's always the option of simply making that first column wider, but I don't know that we want to make every code's layout based on the longest possible section number in any legal code that we can find. :)

    —
    Reply to this email directly or view it on GitHub.

  3. waldoj commented on Jun 6, 2013

    @waldoj
    MemberAuthor

    In my travels about the code, I'll keep my eyes open for one that's just a hot mess.

  4. waldoj commented on Jul 1, 2013

    @waldoj
    MemberAuthor

    Title 63.2, Chapter 12 is a hot mess. (Here's a Vagrant link that might work for you.)

    long-numbers

    I don't know if it's the worst case, but it's the worst I've noticed for a while. :)

  5. jathayde commented on Jul 1, 2013

    @jathayde
    Member

    That's about as hot mess as you get. Thanks I'll take a stab at fixing it.

  6. waldoj commented on Jul 1, 2013

    @waldoj
    MemberAuthor

    👍

  7. added a commit that references this issue on Aug 1, 2013
  8. jathayde commented on Aug 1, 2013

    @jathayde
    Member
  9. waldoj commented on Aug 1, 2013

    @waldoj
    MemberAuthor

    Woo!

    xallthey

  10. krusynth commented on Mar 11, 2015

    @krusynth
    Member

    It's back with a vengeance. I tried upping the margin width to 150px but it's still not enough. We might want to make this a gasp table.

    http://chicagocode.org/18/

  11. waldoj commented on Mar 11, 2015

    @waldoj
    MemberAuthor

    grumble grumble

    No, you're right. Table it is.

  12. krusynth commented on Mar 11, 2015

    @krusynth
    Member

    screen shot 2015-03-11 at 4 44 16 pm

    Pics or it didn't happen.

  13. krusynth commented on Mar 11, 2015

    @krusynth
    Member

    Also, look it's #574 happening too.

  14. waldoj commented on Mar 11, 2015

    @waldoj
    MemberAuthor

    For the record, I do much prefer providing this data as a definition list, semantically, but there's a point when you've just got to be realistic. The fact is that there's bulk data and an API—nobody needs to be scraping these records. This isn't really tabular data, but it's not not tabular data. Tables are such a sensible solution that I think it's the way to go.

  15. added a commit that references this issue on Jan 15, 2017
    5807a49
  16. modified the milestones: 1.0, 0.8 on Jan 15, 2017
  17. added a commit that references this issue on Apr 7, 2017
    154754d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions