Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 231647

Summary: Improve portal's sort by options
Product: Community Reporter: Nick Boldt <nboldt>
Component: Project Management & PortalAssignee: Portal Bugzilla Dummy Inbox <portal-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bjorn.freeman-benson, karl.matthias
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 228978    
Bug Blocks:    
Attachments:
Description Flags
screenshots
none
screenshot showing room for a nav on the left and for boxes on the right none

Description Nick Boldt CLA 2008-05-12 15:33:19 EDT
Created attachment 99798 [details]
screenshots

The new sort-by links don't work as expected -- sorting by information puts the information at the bottom of the page, exactly as when I'm unsorted or sorted by project. Shouldn't sorting by information put the information at the top? And what does "sort by attention" mean?

Instead of sorting, why not just provide those links as #anchors to the content?

Sorting doesn't really provide improved access to information, as after sorting I still have to scroll all the way down, and I lose the two-column format.

Oh, and "Default" sort scatters the information stuff in with the projects. How's that useful as a default? At least at the bottom it's all together in one group.

See attached screenshots.
Comment 1 Bjorn Freeman-Benson CLA 2008-05-12 15:46:38 EDT
(In reply to comment #0)
> The new sort-by links don't work as expected -- sorting by information 
> puts the information at the bottom of the page,

No, it doesn't.  If click on "information", all the boxes with "informational" content are put in a div at the top of the page and all the boxes with no such annotation are put at the bottom of the page.

Each box has internal attributes such as "information" or "action" or "technology.dash" or whatever.

> Shouldn't sorting by information put the information at the top?

It does: it puts all the boxes whose internal tags are "information" at the top. There are a lot of them.

> And what does "sort by attention" mean?

Each box has a set of key-value pairs.  "attention" is one of the keys and the values are "action" (an action is required) and "information" (no action is required).  Sorting by attention puts the action oriented items at the top.

> Instead of sorting, why not just provide those links as #anchors to the
> content?

Because there are many different ways to look at the content: by project, by action needed, (and some future ones such as "by Eclipse conference" and "by membership category").

> Sorting doesn't really provide improved access to information, as after sorting
> I still have to scroll all the way down, and I lose the two-column format.

All the way down to what?

> Oh, and "Default" sort scatters the information stuff in with the projects.
> How's that useful as a default? 

Perhaps it's not. However, each box has a default sort order and "sort by default" uses that sort order. Perhaps we should change the default to "sort by attention" so that action needed boxes are always at top...
Comment 2 Bjorn Freeman-Benson CLA 2008-05-12 15:49:30 EDT
(In reply to comment #0)
> Instead of sorting, why not just provide those links as #anchors to the
> content?

So you're suggesting that "sort by project" sort all the boxes by project and then the project links next to them just be anchors that jump to the correct section? I like that.
Comment 3 Nick Boldt CLA 2008-05-12 16:48:58 EDT
(In reply to comment #2)
> (In reply to comment #0)
> > Instead of sorting, why not just provide those links as #anchors to the
> > content?
> 
> So you're suggesting that "sort by project" sort all the boxes by project and
> then the project links next to them just be anchors that jump to the correct
> section? I like that.

Consider this page:

http://www.eclipse.org/modeling/project-info/team.php

And the ways to jump to content:

http://www.eclipse.org/modeling/project-info/team.php#Committers
http://www.eclipse.org/modeling/project-info/team.php#Contributors

then, to filter by a subset of the data:

http://www.eclipse.org/modeling/project-info/team.php?PMCs

or to categorize/sort:

http://www.eclipse.org/modeling/project-info/team.php?byProject
(with new header links for intra-page jumping)


Comment 4 Bjorn Freeman-Benson CLA 2008-05-12 16:57:48 EDT
(In reply to comment #3)
I don't get it - I still have to click different urls and reload the page to get the "sorted by name" versus "sorted by project"...
Comment 5 Nick Boldt CLA 2008-05-12 17:09:39 EDT
(In reply to comment #4)
> (In reply to comment #3)
> I don't get it - I still have to click different urls and reload the page to
> get the "sorted by name" versus "sorted by project"...

I'm just showing how you can anchor link within a long page, or how if you sort/filter the contents, the anchors might change to match the new database query results. 

And how you can move trivial things like sort links out of the way (use the whitespace on the right), while keeping important links (content jump anchors) front-and-center so they're immediately useful for jumping through a long page.

I still like the idea of moving the information boxes to the right bar [1] instead of mixing them in with the project management boxes, since they serve a different purpose, and make the page shorter.

[1] http://www.eclipse.org/modeling/yeportal/?sty
Comment 6 Bjorn Freeman-Benson CLA 2008-05-12 17:25:07 EDT
(In reply to comment #5)
> I still like the idea of moving the information boxes to the right bar [1]
> instead of mixing them in with the project management boxes, since they serve a
> different purpose, and make the page shorter.

I know you do, but I don't - all boxes are equal - they are just "an encapsulation of interaction betwixt you and the Foundation". Plus we don't have any white space on the left or right any more.
Comment 7 Nick Boldt CLA 2008-05-12 17:36:24 EDT
Created attachment 99828 [details]
screenshot showing room for a nav on the left and for boxes on the right

(In reply to comment #6)
> Plus we don't
> have any white space on the left or right any more.

Maybe you're looking at an unreleased version?

Aesthetics aside, I think that a box for your contact info or marketing messages about upcoming cons / discount codes / elections awaiting my attention should not be treated the same as a project box with 50 links in it for project management. 

But clearly that's just me. :)
Comment 8 Bjorn Freeman-Benson CLA 2008-05-12 17:39:10 EDT
(In reply to comment #7)
> screenshot showing room for a nav on the left and for boxes on the right

That's because you've made your browser very wide - of course if you do that you'll have plenty of room :-)
Comment 9 Nick Boldt CLA 2008-05-12 17:55:28 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > screenshot showing room for a nav on the left and for boxes on the right
> 
> That's because you've made your browser very wide - of course if you do that
> you'll have plenty of room :-)
> 

1280x1024 is the new 1024x768... but I suppose we haven't hit the tipping point just yet.

http://www.w3schools.com/browsers/browsers_display.asp
Comment 10 Karl Matthias CLA 2008-07-15 13:00:20 EDT
It's not clear to me what's left to do on this bug.
Comment 11 Nick Boldt CLA 2008-07-15 13:19:36 EDT
(In reply to comment #10)
> It's not clear to me what's left to do on this bug.

Well, now that the "default" sort is gone (which didn't seem to provide much value), the only things I can suggest are:

* https://dev.eclipse.org/portal/myfoundation/portal/portal.php?sort=project ought to be a two-column layout

* "attention" / "information" footer boxes could be morphed into right-side boxes which live on the top-right instead of way down the bottom of the page. See this mockup for the right-side boxes: http://www.eclipse.org/modeling/yeportal/?sty (ignore the "ye" stuff) :)



Comment 12 Bjorn Freeman-Benson CLA 2008-07-15 13:54:22 EDT
(In reply to comment #11)
> Well, now that the "default" sort is gone (which didn't seem to provide much
> * https://dev.eclipse.org/portal/myfoundation/portal/portal.php?sort=project
> ought to be a two-column layout

Realistically, that's not going to happen because it's not important enough to figure out the complex code that would make that happen.

> * "attention" / "information" footer boxes could be morphed into right-side
> boxes which live on the top-right instead of way down the bottom of the page.

That's not going to happen either due to both technical reasons and design decisions by Ward and myself.

Because we're not going to do either of these, I understand this bug to be fixed, so I'm closing it.
Comment 13 Nick Boldt CLA 2008-07-15 15:44:21 EDT
(In reply to comment #12)
> (In reply to comment #11)
> > Well, now that the "default" sort is gone (which didn't seem to provide much
> > * https://dev.eclipse.org/portal/myfoundation/portal/portal.php?sort=project
> > ought to be a two-column layout
> Realistically, that's not going to happen because it's not important enough to
> figure out the complex code that would make that happen.

Complex code? Just echo out the <div>s into table cells and after every other one, do a new row.

<?php 
  $cnt = 0;
  print "<table><tr>\n";
  foreach ($bigboxes as $bigbox) {
    print "<td> ... </td>\n"; # one purple box wrapped by a table cell
    $cnt++;
    if ($cnt % 2 == 0) {
      print "</tr>\n<tr>\n"; # if we have two of them, do the next table row
    }
  }
  print "</tr></table>\n"; 
?>

Or, simpler, use the homeitem3col div style, and they'll just wrap by themselves if you set the clear:both style on every other box. 

	$divclass = "homeitem3col";
	$sty = ($cnt % 2 ? " style=\"clear: both\"" : ""); // clear each odd box to keep columns 2x2
	print "<div id=\"$project\" class=\"$divclass\"$sty>\n";
	print "...";
	print "</div>\n";

See also the source of the EMFT homepage (/www/modeling/emft/index.php, /www/modeling/includes/index-common.php) ... we do the same idea.
Comment 14 Karl Matthias CLA 2008-07-15 17:02:23 EDT
(In reply to comment #13)
> Complex code? Just echo out the <div>s into table cells and after every other
> one, do a new row.

Nick, it's not as simple as that because the code already builds two columns inside each project grouping.
Comment 15 Nick Boldt CLA 2008-07-15 23:09:04 EDT
(In reply to comment #14)
> (In reply to comment #13)
> > Complex code? Just echo out the <div>s into table cells and after every other
> > one, do a new row.
> 
> Nick, it's not as simple as that because the code already builds two columns
> inside each project grouping.

But when I sort by project I get one column. What's in the second column? And why can't your php output different HTML depending on the sort method? 

I can point you to numerous examples of how I've done similar stuff, or attach a patch if you point me at your code. I understand from Bjorn the portal can run on Mac, Linux or Windows... so I'd be happy to get it running here in sandbox so I can start providing you w/ patches.

Comment 16 Bjorn Freeman-Benson CLA 2008-07-16 12:05:13 EDT
(In reply to comment #15)
> But when I sort by project I get one column. What's in the second column? And
> why can't your php output different HTML depending on the sort method? 

It only _looks_ like one column :-)  It's actually two columns. But there is only one portal item per project (right now). If there were two or more items per project, you'd see two columns.
Comment 17 Karl Matthias CLA 2008-07-16 12:31:19 EDT
(In reply to comment #15)
> I can point you to numerous examples of how I've done similar stuff, or attach
> a patch if you point me at your code. I understand from Bjorn the portal can
> run on Mac, Linux or Windows... so I'd be happy to get it running here in
> sandbox so I can start providing you w/ patches.

It's not that it can't be done, of course it can.  But it's actually a fairly substantial architectural change in the Portal to make it work how you want.  The reason is that the components are responsible for drawing themselves and they have no knowledge of what else is on the screen.  They also render themselves for the test framework in two different ways as well as being drawn by certain AJAX calls, and housed in the bubbles for swim diagrams.  You can build CSS to kinda lay it out properly for the portal screen, which is what we have, but to do it intelligently based on how many items are to be displayed and how many columns are needed requires moving all of the display code out of the component and up into the top level code or adding a large amount of error-prone javascript to lay it out.  Then there are changes needed in the AJAX interaction to make that work properly when we do things like create a new component (say after a nomination happens), or remove a component.  You'd have to either write substantial client side code, or seriously hack the PHP.  In either case the changes would not be easily tested or represented in the test framework.  This is a major change and so we've deemed it not worth the time and risk for the pay back.
Comment 18 Karl Matthias CLA 2008-08-01 15:02:55 EDT
Closed or released for STAGING_245.  Please read final bug comments for actual closure status.  This message does not imply any action not already described.