Inspired by https://github.com/Jasig/uPortal/pull/392/files#r15399346, I'll state that I've found it annoying that we tend to have sequential #s in the IDs in the layout-fragment.xml files. I propose we adopt a numbering convention that spaces the IDs out so changes to a file generally don't incorporate a lot of unneeded noise of renumbering IDs throughout the rest of the xml file.

My proposal is:

- root folder has an ID of 1
- folders under root are spaced 30 apart, first one starting with ID=10 to allow for 2 or 3 columns
- column folders are spaced 10 apart starting with the next sequential #
- portlets just take the next available sequence number under their corresponding folder

so something like (contents abbreviated to show concept)

<layout>
  <folder ID="s1">
      <folder ID="s10" type="page-top">
          <channel fname="dynamic-respondr-skin" ID="n11"/>
          <channel fname="fragment-admin-exit" ID="n12"/>
    </folder>
    <folder ID="s40" type="customize">
          <channel fname="personalization-gallery"ID="n41"/>
    </folder>
    <folder ID="s70" name="Welcome" type="regular" >
      <folder ID="s71" name="Column" type="regular">
          <channel fname="email-preview-demo" ID="n72">
          <channel fname="weather" ID="n73"/>
          <channel fname="pbookmarks" ID="n74"/>
      </folder>
      <folder ID="s80" name="Column" type="regular">
          <channel fname="calendar" ID="n81"/>
      </folder>
    <folder ID="s90" name="Column" type="regular">
        <channel fname="other-calendar" ID="n91"/>
      </folder>
    </folder>
  </folder>
</layout>

This would reduce time when making manual layout changes, and reduce the noise in some of the commits. We could forgo sequential numbering altogether, but I think something like this would strike a reasonable balance to make it easier to avoid duplicating ID #s, and it would reduce the confusion of new adopters that wouldn't immediately realize that the s#s and the n#s have to be unique within the file. This might reduce a few stubbed toes.

Thoughts?

--
James Wennmacher - Unicon
480.558.2420


--
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to