Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updated Trac query styling to be more compact and support mobile. #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sarahboyce wants to merge 2 commits into django:main
base: main
Choose a base branch
Loading
from sarahboyce:update-query-ui
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 48 additions & 2 deletions scss/trachacks.scss
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,27 @@ pre.wiki {
white-space: pre-wrap;
}

#content.ticket {
width: auto;
#generic:has(#guest) {
// Reduce the options available to guests.
#query .option {
display: none;
}
}
#content {
margin-top: 1em;
.ticket {
width: auto;
}
.report-result {
margin-top: 1em;
}
.paging {
margin: 0;
}
// Hide the first paging options as also available at the bottom.
.report-result + .paging {
display: none;
}
}

.foldable {
Expand Down Expand Up @@ -226,6 +245,7 @@ div[role="main"]{
li {
border-right: 0;
padding: 1em;
margin-top: 0;

a {
font-size: 16px;
Expand Down Expand Up @@ -259,6 +279,10 @@ div[role="main"]{
}
}

#ctxtnav {
display: none;
Copy link
Member

@bmispelon bmispelon Oct 7, 2024

Choose a reason for hiding this comment

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

What's the effect of this change? From my (limited) testing, the ctctnav element is not present on the ticket list (I've seen it only on wiki pages)

}

#mainnav {
border: 0;
border-radius: 0;
Expand Down Expand Up @@ -413,3 +437,25 @@ div[role="main"]{
}
}
}

/* Mobile */

@media (max-width: 767px) {
#metanav {
ul {
li {
padding: 1em 0.5em !important;
}
}
}

#filters {
min-width: inherit;
overflow: scroll;
}

div:has(.listing.tickets) {
min-width: inherit;
overflow: scroll;
}
}
4 changes: 2 additions & 2 deletions trac-env/conf/trac.ini
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ name = Django
url = https://code.djangoproject.com/

[query]
default_anonymous_query = status!=closed&desc=1&order=id
default_query = status!=closed&desc=1&order=id
default_anonymous_query = description~=&status!=closed&desc=1&order=id&col=id&col=summary&col=type&col=owner&col=component
default_query = description~=&status!=closed&desc=1&order=id&col=id&col=summary&col=type&col=owner&col=component

[repositories]
.dir = /django-mirror
Expand Down
2 changes: 1 addition & 1 deletion trac-env/htdocs/css/output.css
View file Open in desktop

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions trac-env/templates/django_theme.html
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ <h1>Issues</h1>
</div>
</div>


# if req.authname == 'anonymous' or req.authname == '':
Copy link
Member

@bmispelon bmispelon Oct 7, 2024

Choose a reason for hiding this comment

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

You can use if not req.is_authenticated I think

<div id="guest"></div>
Copy link
Member

@bmispelon bmispelon Oct 7, 2024

Choose a reason for hiding this comment

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

What's the advantage of using this empty element rather than for example a class on the <body>?

# endif

# if req.path_info == '/':
<div class="container sidebar-right">
${main()}
Expand Down
1 change: 1 addition & 0 deletions trac-env/templates/site_head.html
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="${href.chrome('site/css/output.css')}" />
<link rel="stylesheet" href="${href.chrome('site/css/trachacks.css')}" />
<!--! uncomment for local version of webfont loader if desired. -->
Expand Down

AltStyle によって変換されたページ (->オリジナル) /