Dedicated project page #166
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "blindxfish/devplacepy:project-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces #165, rebuilt from scratch on current master (
782bcec) after the review there.This is the project page only. The SEO layer from #165 is gone: no
seo.pychanges, no JSON-LD, no meta/schema work of any kind.git diff --stat origin/master...project-pagetouches no SEO file.What it does
Turns
/projects/{slug}into a dedicated project showcase instead of a generic detail row..project-shellon--bg-card) wraps hero, tab bar and the two-column body; inner panels sit one elevation lighter on--bg-secondary..project-tabs) linking#about/#devlog/#screenshots/#comments/ Files. Server-rendered anchors, no JS tab state.project_uidpoints here, rendered through the existing_post_card.html), Screenshots gallery, comment thread.topic=devlogplus this project, and a More-menu Add screenshots flow.website_urlandrepo_url, normalized bymodels.normalize_website_url(scheme-less input getshttps://, non-http(s) rejected), rendered withrel="noopener nofollow".Addressing the review on #165
cover_attachment_uid,logo_attachment_uid), uploaded by the existingdp-uploadwidget to/uploads/uploadand linked throughattachments.link_attachments. No second upload path, no bespoke file handling. The route validates each uid viadatabase.get_user_attachment(must exist, belong to the actor, be an image) before linking; a foreign or unknown uid is ignored rather than linked.content.pyaddition iscount_project_devlog, a count query. Rendering stays onrender_content/render_title.devplacepy/adds either. Test docstrings follow the convention already in those same test files.website_urlandrepo_url.Composer duplication
The post composer form now lives once, in
templates/_post_composer_form.html, included by bothfeed.htmlandproject_detail.htmlwith locals_composer_topic/_composer_project. The previous inline copy infeed.htmlis removed rather than forked.Four faces
The one new route,
POST /projects/{slug}/screenshots, is fanned out:ProjectScreenshotsForm, owner-only, audit eventproject.screenshots.addproject_add_screenshotsprojects-screenshotscomment_count/devlog_countrideProjectDetailOut; the new project fields rideProjectOut.Testing
Full suite on this branch: 3334 passed, 9 failed. The 9 failures are
tests/api/projects/workspace.pyneeding the docker CLI, and they reproduce identically on untouched master in the same environment. Environmental, not regressions.New coverage:
tests/api/projects/devlog.py(detail counts, cover/logo resolution, foreign-uid rejection, screenshots route incl. non-owner refusal),tests/api/projects/edit.py,tests/e2e/projects/devlog.py(Stats card, owner Post update control, guest/non-owner absence),tests/unit/models.py(URL normalization).The project detail page becomes a full project showcase built entirely from existing platform mechanisms. One encompassing dark card wraps the page; inner panels (tab bar, sidebar cards, devlog entries, comments) sit one elevation lighter. The hero opens with a cover banner and an optional logo tile, both plain attachment references (cover_attachment_uid/logo_attachment_uid) uploaded through the standard dp-upload attachment widget and linked via the existing link_attachments choke point - the route validates each uid belongs to the actor and is an image, and an empty value on edit keeps the current one. The title block, type/platform chips and author row overlay the banner behind a scrim with a dark text shadow, next to an owner-set Visit Website CTA; website_url and repo_url are normalized in models and render with rel noopener nofollow. An anchor tab bar (Overview, Devlog, Screenshots when present, Comments, Files) navigates the page. The main column keeps About, the devlog timeline (with devlog_count and an owner Post update button opening the shared composer preset to the devlog topic + project - the form now lives once in _post_composer_form.html, included by feed.html and project_detail.html), a Screenshots gallery built from image attachments minus the cover/logo (thumbnails, lightbox, 12 rendered), and the comment thread; the sidebar holds Links, Stats and the Author card. Owners add gallery images from the More menu via POST /projects/{slug}/screenshots (owner-only, audit project.screenshots.add, Devii action project_add_screenshots, docs id projects-screenshots). comment_count/devlog_count ride ProjectDetailOut, the new fields ride ProjectOut, and the create/edit faces (modals, Devii actions, API docs) carry them. The project comment/files e2e tests scope their locators per the documented dual-control idiom, and new unit/api/e2e tests cover URL normalization, the counts, the hero attachment guard, the screenshots flow and the preset composer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>