Skip to content

Conversation

cyberalien
Copy link
Contributor

New layout for .topiclist lists

Adjustments for .html files include:

  • Wrapping content of dt in div.list-inner
  • Adding extra tab for contents of div.list-inner
  • Adding class name to ul.topiclist to indicate how many columns are there

RFC: http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=44139
Ticket: http://tracker.phpbb.com/browse/PHPBB3-11489

@nickvergessen
Copy link
Contributor

Can you provide screenshots of new vs old?

@cyberalien
Copy link
Contributor Author

@melvingb
Copy link
Contributor

I like this implementation,
With this the forumlist does not deformed to see it at different resolutions or am I wrong?.

@cyberalien
Copy link
Contributor Author

Yes, it does not get deformed because with this solution combined width of all columns is always 100% of container's width.

$template->assign_vars(array(
strtoupper($block) . '_COLS' => count($notification_methods),
strtoupper($block) . '_COLS1' => count($notification_methods) + 1,
strtoupper($block) . '_COLS2' => count($notification_methods) + 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, at the end of this line,
also use sizeof() once and put it in a variable?

@cyberalien
Copy link
Contributor Author

@nickvergessen Fixed

@cyberalien
Copy link
Contributor Author

Forgot about RTL stuff. Also removed class name related to this PR that isn't used.

@@ -43,7 +43,7 @@ public function test_user_subscriptions($checkbox_name, $expected_status)
$crawler = $this->request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options');
$this->assert_response_success();

$cplist = $crawler->filter('.cplist');
$cplist = $crawler->filter('.table1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going from a meaningful to a meaningless class name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going from list to a table. Nether old nor new class name is specific to that page. There was one .cplist list, now there is one .table1 table.

@p
Copy link
Contributor

p commented May 4, 2013

This goes into 3.2.

@cyberalien
Copy link
Contributor Author

It shouldn't. This PR is basically a bug fix for 2 issues:

  • Topic lists using mix of pixels and percentages, which ruins layout at low resolution
  • Notification settings layout that uses topiclist incorrectly

Do you want to release 3.1 with bugs?

@naderman
Copy link
Member

naderman commented May 4, 2013

Why hasn't either of those issues been reported as a bug?

@naderman
Copy link
Member

naderman commented May 4, 2013

Can't you fix the notification settings layout separately - that would make this PR smaller and each of them easier to review and understand all the implications?

@cyberalien
Copy link
Contributor Author

Notification settings bug was discovered only when I was working on this PR. It is related to issue this PR solves, so I thought it would be ok to fix them both. I'll create a ticket and move it to separate PR.

As for topic lists layout, while it is technically a bug, it was done intentionally during 3.0 development because of limitations of very old browsers (IE6 and below) that were actual back then. So I'm not sure if it should be treated as bug or improvement.

<li class="row<!-- IF notification_types.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
<table class="table1" cellspacing="1">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is cellspacing being used in 2013?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cellspacing is actually HTML5 invalid too. (of course, the adm/style files are littered with table cellspacing and border attributes, so somebody may wanna look at removing that one day too)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be changed, but that would require changing all tables. This code uses exactly same table code as other tables in prosilver.

@p
Copy link
Contributor

p commented May 6, 2013

If there is a bug being fixed here, there should be aticket of type "bug" filed, with an appropriate bug description.

"Currently forum columns use mix of percentages and pixels for width and margin/padding, causing columns to stretch at different resolutions and at low resolution break layout." - what resolutions? was this working before? if yes in which version? etc.

@cyberalien
Copy link
Contributor Author

Marked as WIP because notification settings fixes were moved to separate pull request and should be removed from this PR.

@cyberalien
Copy link
Contributor Author

Removed notification settings changes because they are now in separate PR and unmarked as WIP.

@cyberalien
Copy link
Contributor Author

Squashed commits and rebased on latest develop, so notification settings changes would be included from develop.


dl.icon dt, dl.icon dd {
min-height: 40px;
*min-height: 32px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go in tweaks.css (along with the similar hacks)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll move it there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -29,4 +29,21 @@ dl.details dd {
/* Headerbar height fix for IE7 */
#site-description p {
*margin-bottom: 1.0em;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-add newline at end of file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are reading it wrong. There was no newline character at the end of tweaks.css, I've added new line and then code after it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vjacheslav is correct.

@EXreaction
Copy link
Contributor

Everything else looks good to me, I can merge this after that's fixed.

@EXreaction EXreaction merged commit d09c666 into phpbb:develop May 20, 2013
}

dl.icon dt, dl.icon dd {
min-height: 40px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cyberalien I think this is problematic... It just looks weird now, the topic rows are all a bit taller than usual and the content is misaligned vertically in them towards the top as a result, and topic icons are now positioned to the bottom left... Removing this restores the original height and topic-icon locations to the way they have always been.

With the 40px min height (not attractive):
notgood

Without the 40px min-height (better and as it was):
corrected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. It could be decreased, but it is needed to prevent row from being smaller than icon height.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 35px ? Looks good at 35 IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you gonna adjust it, or were you expecting me to ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do it or you can submit patch, doesn't matter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it to you if you probably still have this branch active in your repos :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and made a #1451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants