Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
4515b85
feat: template & setting for Google search
wesleyboar Oct 22, 2024
2883e49
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Oct 22, 2024
8607c90
fix: styles and fallback warning for Google Search
wesleyboar Oct 22, 2024
f3dc4dc
enhance: move sarch CSS to its own file
wesleyboar Oct 22, 2024
3947bc2
enhance: rename search stylesheet and ID
wesleyboar Oct 22, 2024
d0d5e00
refactor: move css to top of template
wesleyboar Oct 22, 2024
b74e2a0
fix: missing default GOOGLE_SEARCH_ENGINE_ID
wesleyboar Oct 22, 2024
7c93b7e
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Oct 23, 2024
f80ebc8
feat: search template is standard
wesleyboar Oct 23, 2024
5208bde
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Oct 23, 2024
9457519
feat: convert search template into a search app
wesleyboar Oct 23, 2024
16d34c3
feat(search_page): slimmer views.py
wesleyboar Oct 23, 2024
da3a73a
feat(search): create page if it does not exist
wesleyboar Oct 23, 2024
5fb5a32
fix(search): restore breadcrumbs
wesleyboar Oct 23, 2024
1fef4f8
chore(search_page): remove now-unnecessary file
wesleyboar Oct 23, 2024
e8072e6
enhance(search_page): flag page as auto-generated
wesleyboar Oct 23, 2024
3291015
enhance(search): attach apphook to manage urls
wesleyboar Oct 23, 2024
ca11f07
style(search): polish
wesleyboar Oct 24, 2024
445010c
fix(search): searchbar not using curr. search path
wesleyboar Oct 24, 2024
8d812c8
chore(search): remove cruft
wesleyboar Oct 24, 2024
3793bb9
chore(search): reduce silly complexity of tag
wesleyboar Oct 24, 2024
92e9ecf
chore(search): remove cruft 2
wesleyboar Oct 24, 2024
adf6ad2
feat(search): auto isntall and setup
wesleyboar Oct 24, 2024
d9db279
feat(search): simplify an isolate markup
wesleyboar Oct 24, 2024
fda65e5
core(search): remove cruft markup
wesleyboar Oct 24, 2024
9d88be6
chore(search): simlify utils.py
wesleyboar Oct 24, 2024
148f661
style(search): new line
wesleyboar Oct 24, 2024
7cbb96e
refactor(search): polish
wesleyboar Oct 24, 2024
f57d4e1
refactor(search): rename a function
wesleyboar Oct 24, 2024
55b84da
style(search): ending slash for example path
wesleyboar Oct 24, 2024
3ee4fe1
style(search): ending slash for example path
wesleyboar Oct 24, 2024
b4d6ac3
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Oct 25, 2024
0f16d38
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Oct 26, 2024
ba2b091
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Nov 1, 2024
959ba8e
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Nov 14, 2024
7dd0402
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Nov 14, 2024
a12a70f
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Nov 14, 2024
74230c0
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Jan 14, 2025
34be454
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Jan 17, 2025
a1a79b5
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Mar 13, 2025
448b6b3
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Mar 31, 2025
1db6303
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Jun 16, 2025
6de0143
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar Aug 29, 2025
645b8b7
fix: search results style bugs
wesleyboar Feb 23, 2026
18695ab
fix: MORE search results style bugs
wesleyboar Feb 23, 2026
846e35e
fix(a11y): lighter accent color
wesleyboar Feb 23, 2026
3263ccf
Quick: Rename csrftoken to csrfcookie (#1122)
jarosenb Mar 17, 2026
6eafc75
feat: initial bootstrap 5 support (#1123)
wesleyboar Mar 18, 2026
b836015
fix: a11y issues (#1089)
wesleyboar Mar 18, 2026
67fed8b
Merge branch 'release/v4.36.X' into feat/template-and-setting-for-goo…
wesleyboar Mar 24, 2026
51c9098
fix: news read-more link can't click (#1131)
wesleyboar Mar 25, 2026
0cca2af
chore: add "accessibility" to labels conf
wesleyboar Mar 26, 2026
6e7f4bc
refactor: figure & blockquote, @mixin not @extend (#1135)
wesleyboar Mar 26, 2026
a3b3cda
deps: core-styles for more a11y fixes (#1140)
wesleyboar Mar 27, 2026
fc1c500
fix: a11y issues, round 2 (#1141)
wesleyboar Apr 1, 2026
57b6523
ci: add .gitmessage
wesleyboar Apr 6, 2026
6bc76ec
style: new line for immediate typing .gitmessage
wesleyboar Apr 6, 2026
5cd2d20
docs: explain PR template better (rename to uppercase)
wesleyboar Apr 8, 2026
588aa02
docs: PR template testing instructions for CMS
wesleyboar Apr 8, 2026
ff41687
docs: PR template tweaks
wesleyboar Apr 8, 2026
208611d
chore(deps): core-styles v2.55 + section--accent (#1144)
wesleyboar Apr 9, 2026
5cb2b4e
chore(ci): bump node to 20 to match core-styles (#1145)
wesleyboar Apr 9, 2026
76f1d09
chore: bump node to 20 in package.json
wesleyboar Apr 9, 2026
a5905e2
chore(deps): bump core-styles again for a11y (#1146)
wesleyboar Apr 9, 2026
28bb1a7
fix: footer links (#1147)
wesleyboar Apr 13, 2026
deeb8c7
fix(ai): target="_blank" rel="noopener noreferrer"
wesleyboar Apr 13, 2026
bc6f9b4
docs: fix default URL path for style QA page
wesleyboar Apr 13, 2026
0446f9b
docs: fix inaccurate section style manage cmd details (#1148)
wesleyboar Apr 13, 2026
8122b86
docs(AGENTS): pull requests
wesleyboar Apr 17, 2026
27e8d8d
docs(AGENTS): formatting clean up
wesleyboar Apr 17, 2026
b53ded6
docs(AGENTS): clarity
wesleyboar Apr 17, 2026
87f95c1
chore(deps): use Core-Styles footer fix branch (#1149)
wesleyboar Apr 17, 2026
4f14e0e
Merge branch 'main' into feat/template-and-setting-for-google-search
wesleyboar May 12, 2026
5d0b3e2
Merge branch 'release/v4.36.X' into feat/template-and-setting-for-goo…
wesleyboar Jul 27, 2026
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
65 changes: 65 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## Overview

<!--
1–3 sentences stating what problem this solves and what you changed at a high level. Example:

"Fixes caption contrast on dark sections by using opacity instead of a fixed dark color."
-->

…

## Related

<!--
Delete the bullets you don't need. Any ticket / cross-repo links go here. Examples:

- [CMD-XYZ](https://tacc-main.atlassian.net/browse/CMD-XYZ)
- requires https://github.com/TACC/Some-Repo/pull/NNN
- required by https://github.com/TACC/Other-Repo/pull/NNN
-->

- …

## Changes

<!--
Use short bullets. Add bold verb as prefix to help scanning; example:

- **added** `.o-widget--compact` modifier
- **updated** demo markup for Fractality
- **deleted** cruft in a working file
- **fixed** typo
-->

- …

## Testing

<!--
Numbered steps another dev can repeat. Include local URLs for UI changes. Example:

1. `make start`
2. Create a page with plugin X that has setting Y with value Z.
3. Verify UI shows …
-->

1.


## UI

<!--
Add screenshots via GitHub PR editor. Organize and label with a table; example:

| Before | After |
| - | - |
| <img width="900" alt="before" src="..." /> | <img width="900" alt="after" src="..." /> |
-->

…

<!--
## Notes

Optional: rollout, follow-ups, known limitations, unrelated dist churn.
-->
4 changes: 4 additions & 0 deletions .github/labels_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# + "paused"
# + "proposal"

- name: accessibility
color: 'FA8122'
description: Accessibility degraded or unavailable

- name: blocked
color: 'FA8122'
description: Unable to begin or continue work
Expand Down
29 changes: 0 additions & 29 deletions .github/pull_request_template.md

This file was deleted.

20 changes: 20 additions & 0 deletions .gitmessage
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


# type(scope)!: short summary
#
# Types: feat, fix, docs, style, refactor, perf, test, chore, build, ci
# Scope (optional): describes area, e.g. api, ui, auth, deps
# ! (optional): marks breaking changes
#
# Examples:
# feat(api)!: add user search endpoint
# chore(deps): update
# style: delete excess whitespace
#
# Body (optional):
# What changed and why
# Important design decisions or context
#
# Footer (optional):
# BREAKING CHANGE: describe breaking change
# Closes #123, Relates-to #456
4 changes: 4 additions & 0 deletions .pr_agent.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pr_reviewer]
extra_instructions = """
Do not flag missing `rel="noopener noreferrer"` on `target="_blank"` links as a security issue. Modern browsers implicitly apply `noopener` per the HTML spec. This is not an active vulnerability.
"""
35 changes: 27 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# AGENTS.md

## Cursor Cloud specific instructions
- [Architecture](#architecture)
- [Pull Requests](#pull-requests)

## Architecture

This is a **Docker-based Django CMS** project. All application code runs inside Docker containers.

Expand All @@ -12,7 +15,7 @@ This is a **Docker-based Django CMS** project. All application code runs inside
| PostgreSQL 14.9 | `core_cms_postgres` | `5432` (internal) |
| Elasticsearch 7.17 | `core_cms_elasticsearch` | `localhost:9201` |

### Makefile commands
### Make

Use the `Makefile` instead of raw `docker compose` commands:

Expand All @@ -24,27 +27,43 @@ Use the `Makefile` instead of raw `docker compose` commands:
| `make stop` | Stop containers |
| `make clean` | Stop containers, remove volumes and images |

### First-time setup
### Setup

```sh
DJANGO_SUPERUSER_PASSWORD=yourpass make setup
```

`make setup` (i.e. `bin/setup-cms.sh`) handles: settings file creation, Docker build, container startup, readiness polling, migrations, superuser creation, CSS build, and `collectstatic`. Non-interactive shells must set `DJANGO_SUPERUSER_PASSWORD`; a TTY prompts interactively.
`make setup` (i.e. `bin/setup-cms.sh`) handles: settings file creation, Docker build, container startup, readiness polling, migrations, superuser creation, CSS build, and `collectstatic`. Non-interactive shells (e.g. agent runs) must set `DJANGO_SUPERUSER_PASSWORD`; a TTY prompts interactively.

_Note: Stale containers errors (e.g. `core_cms_elasticsearch already in use`) come from old Compose state. Ask human whether to remove stale `core_cms*` containers/projects; once resolved, rerun `make setup`._

### Dependencies

### Key gotchas
- When updating dependencies, use `npm` commands (e.g. `uninstall`/`install`); do not hand-edit lockfile entries.
- When installing `@tacc/core-styles`, use a published version from the registry, or a `git+https://github.com/...` spec so install does not require SSH.

### Gotchas

#### Settings & Secrets

- **Settings files** are gitignored. Created from `*.example.py` by `bin/setup-cms.sh` or manually.
- The `secrets.py` Elasticsearch host should be `core_cms_elasticsearch` (the Docker hostname), not `elasticsearch`.
- **Postgres secret files:** `docker-compose.dev.yml` mounts `./conf/postgres/*.secret` files. These are not required for development and can be ignored.

#### Elasticsearch

- **`secrets.py` Elasticsearch host:** Should be `core_cms_elasticsearch` (the Docker hostname), not `elasticsearch`.
- Docker commands may need `sudo` depending on the environment.
- **Elasticsearch cgroups v2:** ES 7.17.0 crashes on kernels with cgroups v2 (`CgroupV2Subsystem` NPE). Use ES 7.17.9+ in `docker-compose.dev.yml`.
- **Postgres secret files:** `docker-compose.dev.yml` mounts `./conf/postgres/*.secret` files. These are not required for development and can be ignored.

### Lint, test, build
### Lint, Test, Build

- **Lint:** `docker exec core_cms flake8 taccsite_cms/ --max-line-length=120` (pre-existing warnings expected)
- **Tests:** `docker exec core_cms python manage.py test taccsite_cms.contrib.taccsite_sample --no-input`
- **CSS build:** `docker run --rm -v "$(pwd):/code" -w /code node:18 sh -c "npm ci && npm run build"`
- **Collect static:** `docker exec core_cms python manage.py collectstatic --no-input`

See `README.md` for full setup instructions.

## Pull Requests

Write skimmable, template-aligned PRs; reviewers can see the code diff for details.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN poetry install --no-root


# NODE DEPENDENCIES & BUILD & OUTPUT
FROM node:18 as node_build
FROM node:20 as node_build

# Install dependencies
COPY package.json package-lock.json /code/
Expand Down
Empty file added apps/search_page/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions apps/search_page/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.apps import AppConfig
from django.conf import settings

class SearchPageConfig(AppConfig):
name = 'apps.search_page'

def ready(self):
if settings.SEARCH_PAGE_AUTO_SETUP:
from .utils import create_page
create_page()
Comment on lines +7 to +10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Db write in appconfig.ready 🐞 Bug ☼ Reliability

SearchPageConfig.ready() calls create_page(), which performs ORM reads/writes during Django app
initialization; this can crash server startup or management commands when CMS tables aren’t
migrated/available yet. The codebase already uses post_migrate for DB bootstrapping, so this is an
inconsistent and unsafe initialization mechanism.
Agent Prompt
## Issue description
`SearchPageConfig.ready()` triggers DB work (`create_page()`) during app initialization. This runs on every process start and can fail before migrations (or when DB is unavailable), preventing startup.

## Issue Context
The repository already bootstraps DB state using `post_migrate` (see `taccsite_cms/apps.py`). The search page creation should follow the same pattern and be resilient to missing tables.

## Fix Focus Areas
- apps/search_page/apps.py[1-10]
- apps/search_page/utils.py[41-64]
- taccsite_cms/apps.py[13-24]

## Implementation notes
- Replace `ready()` DB call with `post_migrate.connect(...)` (like `taccsite_cms.apps.TaccsiteCmsConfig`).
- Guard access to `settings.SEARCH_PAGE_AUTO_SETUP` via `getattr(settings, 'SEARCH_PAGE_AUTO_SETUP', False)`.
- Ensure the handler is idempotent and wraps DB errors (e.g., `OperationalError`, `ProgrammingError`) with logging instead of crashing startup.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

11 changes: 11 additions & 0 deletions apps/search_page/cms_apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool


@apphook_pool.register
class SearchPageApphook(CMSApp):
app_name = 'apps.search_page'
name = 'SearchPage'

def get_urls(self, page=None, language=None, **kwargs):
return ['apps.search_page.urls']
152 changes: 152 additions & 0 deletions apps/search_page/static/search_page/css/google-search.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
#google-search {

&:is(#cms-content-container > *:last-child) {
margin-bottom: var(--global-space--section-gap, 60px);
}

/* SEARCH CONTAINER */

/* To remove padding from search container */
& .gsc-control-cse {
padding: unset;
}



/* TABLE OF SEARCH STATS & SORTING OPTIONS */

/* To remove border from search analytics, add gray background */
& .gsc-above-wrapper-area {
--bkgd-color: var(--global-color-primary--x-light);

background-color: var(--bkgd-color);
box-shadow: 40vw 0 var(--bkgd-color), -40vw 0 var(--bkgd-color);
border-bottom: unset;
}

& .gsc-above-wrapper-area-container {
border-bottom: unset;
}

/* To override Core-Styles tables */
& tbody > tr:first-child > :is(td, th) {
border: unset;
padding-inline: unset;
background: unset;
vertical-align: middle;
}

& .gsc-selected-option-container {
background: var(--global-color-primary--xx-light);
border: var(--global-border--normal);
}

& .gsc-result-info {
padding: unset;
font-size: var(--global-font-size--medium);
}



/* SUGGESTION PHRASE (after "Did you mean:") */

& .gs-spelling {
padding: unset;
}
& .gs-spelling a {
color: var(--global-color-accent--light);

/* to undo core-styles.base */
/* https://github.com/TACC/Core-Styles/blob/8ab89d3/src/lib/_imports/elements/links.css */
&:not([href]) {
opacity: 1;
pointer-events: auto;
}
}



/* SEARCH RESULTS */

/* (search result body text) */
& .gs-snippet {
color: var(--global-color-primary--dark);
}

/* (url under search result title) */
& .gs-webResult div.gs-visibleUrl {
color: var(--global-color-secondary--normal);
}

/* (search result titles) */
& a.gs-title:link {
color: var(--global-color-accent--light);
text-decoration: none;
text-decoration-thickness: var(--global-border-width--normal);
text-underline-offset: 0.2em;
}
& a.gs-title:link:hover {
text-decoration-line: underline;
text-decoration-style: solid;
}
& a.gs-title b {
color: currentColor;
}
& .gs-result .gs-title:not(a):hover {
/* to remove duplicate underline */
/* (fix Google's default_v6+en.css bug `.gs-result .gs-title:hover`) */
text-decoration: auto;
}

/* (push search-result description to right) */
& .gs-image-box {
margin-right: 10px;
}



/* GOOGLE PAGE NAVIGATION (at bottom) */

& .gsc-cursor-box {
display: flex;
justify-content: center;
margin-block: var(--global-space--large);
}

& .gsc-cursor-current-page {
color: var(--global-color-accent--light);
text-decoration: none;
text-decoration-thickness: var(--global-border-width--normal);
text-underline-offset: 0.2em;
}

& .gsc-cursor-current-page:hover {
text-decoration-line: underline;
text-decoration-style: solid;
}



/* GOOGLE BRANDING */

& .gcsc-find-more-on-google {
color: var(--global-color-accent--light);
text-decoration: none;
text-decoration-thickness: var(--global-border-width--normal);
text-underline-offset: 0.2em;
}
svg.gcsc-find-more-on-google-magnifier {
fill: currentColor;
}

& .gcsc-find-more-on-google:hover {
text-decoration-line: underline;
text-decoration-style: solid;
}

& .gcsc-branding-img-noclear {
vertical-align: unset;
top: 1px;
}

}
Loading