Modify

Opened 16 months ago

Last modified 14 months ago

#10951 new defect

Layout of Versions view is poor in Trac 1.0

Reported by: rjollos Owned by: rjollos
Priority: normal Component: ExtendedVersionPlugin
Severity: normal Keywords:
Cc: dawuid@… Trac Release:

Attachments (3)

VersionInTrac1.0.png (20.4 KB) - added by rjollos 16 months ago.
version.py.patch (1.6 KB) - added by dawuid@… 16 months ago.
Path to get specific version view get highlighted in mainbar
roadmap.css.patch (2.1 KB) - added by Dawuid 16 months ago.
Changes in :12740 related to roadmap.css generalized to all templates

Download all attachments as: .zip

Change History (18)

Changed 16 months ago by rjollos

comment:1 Changed 16 months ago by rjollos

  • Description modified (diff)

comment:2 follow-up: Changed 16 months ago by rjollos

  • Cc dawuid@… added

dawuid@…: Are you seeing this problem in Trac 1.0.1?

comment:3 Changed 16 months ago by rjollos

(In [12740]) Refs #10951:

  • Bumped version to 1.0dev. A change log will be maintained after the initial 1.0 release.
  • Renamed extendedversion.css to version.css
  • Use CSS from roadmap.css rather than redefining it in version.css.
  • Fixed layout of milestone progress bar on the version view with Trac 1.0.
  • Made strings on the version view template translatable.

comment:4 in reply to: ↑ 2 Changed 16 months ago by dawuid@…

Replying to rjollos:

dawuid@…: Are you seeing this problem in Trac 1.0.1?

Yes. We (my company) are using a modified template for Trac and I thought that all problems in appearance were for that.

comment:5 Changed 16 months ago by anonymous

I have tested your last changes and it seems to work fine. But in the tests I have discovered a little old problem: when you select a specific version, mainbar is not highlighting Versions. Maybe is because VisibleVersion does't implement INavigationContributor? I have attached a patch with this changes and it seems to work fine (but I'm not confident making patches).

Changed 16 months ago by dawuid@…

Path to get specific version view get highlighted in mainbar

comment:6 follow-up: Changed 16 months ago by rjollos

Your patch looks good. Thanks, I will commit it.

I'm planning several more changes to this plugin, so if you don't mind me keeping you in the loop, I'd certainly appreciate having someone review and test the changes.

Had you previously experienced the problem with adding attachments to Versions failing?

comment:7 Changed 16 months ago by rjollos

(In [12752]) Refs #10951:

  • Highlight the Versions entry in the main navigation bar when on the page for a version. Patch by dawuid@….
  • Added a Back to Versions entry in the contextual navigation for the version page.

comment:8 in reply to: ↑ 6 ; follow-ups: Changed 16 months ago by Dawuid

Replying to rjollos:

Your patch looks good. Thanks, I will commit it.

I'm planning several more changes to this plugin, so if you don't mind me keeping you in the loop, I'd certainly appreciate having someone review and test the changes.

Had you previously experienced the problem with adding attachments to Versions failing?

We aren't using attachments in Versions (at least for now).

For me it's perfect that you add new functionality =). We'll try to help you testing new versions.

About this ticket and [12740] I think that maybe the way to write roadmap stylesheet can be generalized to all templates (Trac 1.0.1 has changed only some templates but not all; e.g.: milestone_delete.html). I will attach a patch related with this (seems working fine with our layout).

Changed 16 months ago by Dawuid

Changes in :12740 related to roadmap.css generalized to all templates

comment:9 in reply to: ↑ 8 Changed 16 months ago by rjollos

Replying to Dawuid:

About this ticket and 12740 I think that maybe the way to write roadmap stylesheet can be generalized to all templates.

That patch looks good. I will commit it. Thanks!

comment:10 in reply to: ↑ 8 ; follow-up: Changed 16 months ago by rjollos

  • Status changed from new to assigned

Replying to Dawuid:

(Trac 1.0.1 has changed only some templates but not all; v.g.: milestone_delete.html).

I see that you are right about that. I'm somewhat surprised by this. I've always assumed that add_stylesheet is the preferred way to add stylesheets, but I don't know that there is anything wrong with hard-coding them in the templates. Are you aware of any significant trade-offs and whether it was intentional or unintentional to add the stylesheets in different ways to various templates in the Trac core?

comment:11 Changed 16 months ago by rjollos

(In [12756]) Refs #10951: Add roadmap.css to Versions page and Version Delete page using add_stylesheet rather than hard-coding in the template. Patch by Dawuid.

comment:12 in reply to: ↑ 10 Changed 16 months ago by anonymous

Replying to rjollos:

Replying to Dawuid:

(Trac 1.0.1 has changed only some templates but not all; v.g.: milestone_delete.html).

I see that you are right about that. I'm somewhat surprised by this. I've always assumed that add_stylesheet is the preferred way to add stylesheets, but I don't know that there is anything wrong with hard-coding them in the templates. Are you aware of any significant trade-offs and whether it was intentional or unintentional to add the stylesheets in different ways to various templates in the Trac core?

When stylesheet is added directly in template layout's stylesheets are applied before. So stylesheets in layout are overriden by stylesheets directly written in templates. When stylesheet is added by add_stylesheet layout's stylesheets are added after so can override all stylesheets. I think that layout's stylsheets have to have "the last word" so presentation can be changed effectively.

About Trac, I think that they forgot to change all templates to honour layout. I will open a ticket to see if I'm wrong. I will put the link here.

comment:13 follow-up: Changed 16 months ago by anonymous

I was deeply wrong. Both ways to add a stylesheet (with add_stylesheet and directly in template) are completely valid in Trac without conflicts in layout. We were using ThemeEnginePlugin that is the one with conflicts. That plugin puts stylesheet in between both ways. But with official way site stylesheet is written in last position.

Maybe you prefer to revert last patch. We will analyze the change from ThemeEnginePlugin to the official way.

comment:14 in reply to: ↑ 13 Changed 16 months ago by rjollos

Replying to anonymous:

Maybe you prefer to revert last patch.

I don't see a reason to revert the patch, do you? I'm interested to see the reply to t:#11126.

comment:15 Changed 14 months ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.