Modify

Opened 12 years ago

Closed 8 years ago

#10951 closed defect (fixed)

Layout of Versions view is poor in Trac 1.0

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: ExtendedVersionPlugin
Severity: normal Keywords:
Cc: Dawuid Trac Release:

Attachments (3)

VersionInTrac1.0.png (20.4 KB) - added by Ryan J Ollos 12 years ago.
version.py.patch (1.6 KB) - added by Dawuid 12 years ago.
Path to get specific version view get highlighted in mainbar
roadmap.css.patch (2.1 KB) - added by Dawuid 12 years ago.
Changes in :12740 related to roadmap.css generalized to all templates

Download all attachments as: .zip

Change History (19)

Changed 12 years ago by Ryan J Ollos

Attachment: VersionInTrac1.0.png added

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 12 years ago by Ryan J Ollos

Cc: Dawuid added; anonymous removed

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

comment:3 Changed 12 years ago by Ryan J Ollos

(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 12 years 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 12 years 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 12 years ago by Dawuid

Attachment: version.py.patch added

Path to get specific version view get highlighted in mainbar

comment:6 Changed 12 years ago by Ryan J Ollos

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 12 years ago by Ryan J Ollos

(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 ; Changed 12 years 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 12 years ago by Dawuid

Attachment: roadmap.css.patch added

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

comment:9 in reply to:  8 Changed 12 years ago by Ryan J Ollos

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 ; Changed 12 years ago by Ryan J Ollos

Status: newassigned

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 12 years ago by Ryan J Ollos

(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 12 years 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 Changed 12 years 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 12 years ago by Ryan J Ollos

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 12 years ago by Ryan J Ollos

Status: assignednew

comment:16 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.