Skip to content

feat: community projects page and switcher navigation entry - #3777

Merged
Anty0 merged 7 commits into
jirikuchynka/public-projectsfrom
jirikuchynka/projects-page-redesign
Jul 2, 2026
Merged

feat: community projects page and switcher navigation entry#3777
Anty0 merged 7 commits into
jirikuchynka/public-projectsfrom
jirikuchynka/projects-page-redesign

Conversation

@Anty0

@Anty0 Anty0 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Projects-page redesign lane of Community Translation v1.0 (#3763).

What

  • Switcher as a navigation surface — the org switcher dropdown gains a "Community translation" entry that navigates to /community-projects instead of switching organization. It is suppressed while already on the community surface.
  • Title + inline switcher — projects-list pages render a "Projects" title with the org switcher inline beside it (ProjectsListTitle). Other pages are unchanged.
  • /community-projects view — a new email-gated view (mirrors RootView) listing cross-org public projects via GET /v2/public/projects/with-stats, reusing the shared ProjectsList (variant="public"). No banner, no "+ PROJECT".

Scope

Frontend only. The endpoint, ProjectsList extraction, and the row public badge/org indicator belong to the base PR #3775 and are not part of this changeset.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6756ab5c-3bcc-4202-af50-8a441f0ede49

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jirikuchynka/projects-page-redesign

Comment @coderabbitai help to get the list of available commands.

@Anty0
Anty0 force-pushed the jirikuchynka/public-projects-view branch from d73514b to 7e57d4a Compare July 1, 2026 19:43
Base automatically changed from jirikuchynka/public-projects-view to jirikuchynka/public-projects July 1, 2026 21:36
@Anty0
Anty0 force-pushed the jirikuchynka/projects-page-redesign branch 4 times, most recently from 6d1e3f9 to ec68e53 Compare July 2, 2026 00:04
@Anty0
Anty0 force-pushed the jirikuchynka/public-projects branch from 96e271b to a824e78 Compare July 2, 2026 00:11
@Anty0
Anty0 force-pushed the jirikuchynka/projects-page-redesign branch 12 times, most recently from bc7bd7c to ba8ae47 Compare July 2, 2026 09:02
Projects-page redesign lane of Community Translation v1.0:

- the org switcher gains a "Community translation" entry that navigates
  to /community-projects instead of switching organization (suppressed
  while already on the community surface)
- projects-list pages render a "Projects" title with the org switcher
  inline next to it
- new email-gated /community-projects view lists cross-org public
  projects via /v2/public/projects/with-stats using the shared
  ProjectsList (variant="public"); no banner, no "+ PROJECT"
@Anty0
Anty0 force-pushed the jirikuchynka/projects-page-redesign branch from ba8ae47 to 118f94e Compare July 2, 2026 11:42
Anty0 added 6 commits July 2, 2026 14:36
Render CommunityTranslationBanner at the top of CommunityProjectsView
(above the header), matching the logged-out public projects view.
…abled

The "Community translation" switcher entry is disabled until contributor
tracking lands (future pitch); skip the tests that drive it, with a TODO
to re-enable them when the button returns.
Public variant of DashboardProjectListItem uses a controls-less grid at
every breakpoint (no reserved space for the hidden row actions), and the
default layout widens the title column 150px -> 180px.
DashboardPage's main area and BaseView's content are CSS grids whose
auto rows stretch to fill the viewport, so the banner (a second grid row)
was blown up vertically. Wrap the banner + list in a flex column so the
banner keeps its natural content height.
@Anty0
Anty0 merged commit bb477aa into jirikuchynka/public-projects Jul 2, 2026
68 of 74 checks passed
@Anty0
Anty0 deleted the jirikuchynka/projects-page-redesign branch July 2, 2026 17:54
Anty0 added a commit that referenced this pull request Jul 16, 2026
- ✅ **Public project toggle** — `public` flag on `Project` (`is_public`
column + Liquibase migration), exposed on `ProjectModel`/`ProjectDto`;
owner-only `PUT /v2/projects/{projectId}/publishing` (gated by
`PROJECT_EDIT` + `checkUserIsOwnerOrServerAdmin`, activity-logged,
cache-evicting); confirmation-guarded "Public project" switch in
advanced settings.
- ✅ **Community permission** (#3770) — authenticated users on a public
project get a computed community floor (read subset of VIEW +
`translations.suggest` + `translation-comments.add`, all languages;
origin `COMMUNITY`) without a stored `Permission` row, so they
contribute without taking a paid seat. Direct/org permissions and
admin/supporter elevation layer on top, so no authenticated user is
below a non-member; anonymous users get nothing. Member emails + member
count are redacted behind `MEMBERS_VIEW` (REST + websocket);
out-of-surface endpoints are gated (MT credits →
`ORGANIZATION_QUOTAS_VIEW`, import-settings → `TRANSLATIONS_EDIT`
(mirrors the import menu gate `translations.edit` + `keys.view`),
branch-merge → `BRANCH_MANAGEMENT`, blocking-tasks →
task-view-or-assigned).

- ✅ **List-row public indicator** (#3771) — public projects show a
second line under the project name in the shared list row
(`DashboardProjectListItem`): an outlined `public` badge + organization
name. Adds `public` to `ProjectWithStatsModel` + assembler. Sole
indicator (no project-detail icon).
- ✅ **Suggestion resolution split** (#3776) — splits the single
suggestion Accept into "Accept only" (`declineOther=false`, leaves the
competing suggestions active) and "Accept and decline others"
(`declineOther=true`, prior behavior). Inline row actions are ✓
Accept-only and ✕ Decline; an `⋮` overflow menu holds
Accept-and-decline-others and Delete (own suggestions only).
Frontend-only — the backend already supported `declineOther`. Optimistic
cache keeps the surviving sibling visible until refetch
(vitest-covered). Two new i18n keys created in "Tolgee itself".
- ✅ **Suggestion moderation** (#3785) — new
`translation-suggestions.manage` scope lets project members delete
suggestions authored by other users (previously author-only). Own
per-language dimension (`suggestManageLanguages`, new join table +
Liquibase migration); `Suggest` and `Manage` are grouped under a new
"Suggestions" permission category, each with its own language selector.
Granted to the EDIT/MANAGE presets; the suggestion list endpoint accepts
`suggest` OR `manage` so moderators see what they can act on. Deletion
is language-restricted like the sibling suggestion actions;
decline/accept stay on `translations.state-edit`. New i18n keys in
"Tolgee itself".
- ✅ **Suggestion display** (#3774) — translations read view embeds up to
3 active suggestions per cell (was 1), newest-first via a windowed top-N
query (cap `MAX_DISPLAYED_SUGGESTIONS=3`, `created_at desc, id desc`);
the existing `+N` overflow badge is the "more" affordance (no separate
button). Stays capped at 3 across the editor open/close, mutate, and
suggest-create paths; `+N` restyled as an inline circle on the last
suggestion row.
- ✅ **Public projects view** (#3775) — logged-out-capable
`/public-projects` page listing all public projects (stats, paged +
search) via anonymous `GET /v2/public/projects/with-stats`
(`@Transactional(readOnly=true)`, filters guard the anonymous read so it
is side-effect-free; the community-permission floor from #3770 applies
for logged-in visitors). Reuses the projects-list UI (shared
`ProjectsList` extracted from `ProjectListView`); community-translation
banner (Figma-matched gradient + dev-mouse mascot + Suggest/Comment
bullets, no Vote), left-anchored search shown only above a >5 project
threshold, `LOG IN`/`SIGN UP` top bar, no org switcher.
`DashboardProjectListItem` gains `variant='public'`: member affordances
(⋮ menu / QA / translations) suppressed, whole-row click opens the
project when logged-in (community VIEW) else routes to login.
- ✅ **Projects-page redesign** (#3777) — projects list header
redesigned: centered "Projects" title with the org switcher relocated
beside it (`standaloneTitle` hides the separator, adds top spacing,
stacks search on its own row); every non-list page keeps the top-left
switcher. Synthetic "Community translation" switcher entry navigates to
`/community-projects` (does not switch org) — **implemented but
temporarily disabled pending contributor tracking** (its e2e tests are
skipped with a re-enable TODO). `/community-projects` page reuses the
projects-list shell, ignores the selected org, lists all public
projects, email-verification gated, with the community-translation
banner on top (**diverges from the pitch's "no banner"** — designer
request). `DashboardProjectListItem` gains a public grid variant that
drops the controls column entirely — no reserved space (default title
width 150→180px, smaller breakpoints unchanged). New i18n keys in
"Tolgee itself".
- ✅ **Community access to public-project orgs** (#3792) — opening a
public project auto-switches the preferred org; for non-members this
previously 403'd because org access only recognized stored
membership/permission rows. Extends the org view floor
(`canUserViewStrictOrPublic` = direct permission / stored org role
**OR** the org owns a publicly visible project) so community and
direct-permission users can view the org and set it as preferred —
**without a dedicated role** (an earlier GUEST-role iteration was
removed; below-member users hold no role). Anything beyond viewing still
requires `MEMBER+`. Reduced preferred-org model below MEMBER
(`activeCloudSubscription` hidden; new
`PrivateOrganizationModel.limitedView` drives the community project-list
view). Guest-visible surface scoped to accessible projects — org GETs
(role `null`), project listings, languages/base-languages, glossary
reads incl. CSV export (one canonical
`ProjectRepository.BELOW_MEMBER_ACCESSIBLE_PROJECT` predicate),
llm-providers (name/type/token-credit pricing only), `/leave`.
Preference healing writes on stale/missing preference; below-member
viewers excluded from member listings, seat stats, and assignee search.
**Billing repo should audit its org-scoped `@UseDefaultPermissions`
endpoints for the widened floor.**

## ⚠️ Breaking changes
- `GET /v2/projects/{id}/machine-translation-credit-balance` now
requires `ORGANIZATION_QUOTAS_VIEW`; granular permissions / API keys
without it get 403 and must be re-granted.
- Branch-merge session endpoints now require `BRANCH_MANAGEMENT`.


## Deliberate inline style literals (no matching MUI theme token)

These Figma-exact values are kept inline on purpose — single-use
surfaces with no matching
`theme` token; not folded into `theme.typography`/`theme.spacing`:

- **CommunityTranslationBanner** (one-off marketing surface): eyebrow
24px/600/lh1.235/ls0.25px;
heading 40px/700/lh1.167/-1.5px (rendered as `h1` for semantics, visual
is the Figma override);
subtext max-width 561px; mascot-zone reserve padding-right 260px; mouse
height 190px / bottom -15px;
  bullet icons 21×22px; gradient stop 69%.
- **SuggestionsFirst** show-all button: 13px / letter-spacing 0.46px
(matches `TrialChip.tsx`) / 6px vertical padding.
- **DashboardProjectListItem** `StyledPublicChip` label: 13px.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary

* **New Features**
* Added public/community projects listing with search, pagination, and
stats.
  * Added project publishing toggle to mark projects public/private.
* Extended permissions with `translation-suggestions.manage`
(per-language suggestion management) and `organization-quotas.view`.

* **Bug Fixes**
* Improved privacy redaction for usernames/emails across REST responses
and realtime activity.
* Refined public/community permission behavior and member visibility
(e.g., hidden member counts when not allowed).

* **Tests**
* Expanded API, UI, and permissions test coverage for public/community
access, publishing, masking, and suggestion-permission rules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
TolgeeMachine added a commit that referenced this pull request Jul 16, 2026
# [3.213.0](v3.212.1...v3.213.0) (2026-07-16)

### Features

* Community Translation v1 ([#3765](#3765)) ([4a4ea3f](4a4ea3f)), closes [#3770](#3770) [#3771](#3771) [#3776](#3776) [#3785](#3785) [#3774](#3774) [#3775](#3775) [#3770](#3770) [#3777](#3777) [#3792](#3792)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant