Migrate Public Data Sharing settings page to Angular - #77
Open
nllong wants to merge 5 commits into
Open
Conversation
- Add SharingComponent under organizations/settings/sharing: public feed
status banner, collapsible URL/query-param docs (JSON/HTML/GeoJSON),
a working Public Query Threshold field (legacy fetched but never
rendered it), searchable/filterable public column-selection table with
select-all, owner + is_parent permission gating, loading/error/success
states, save/reload, dark mode, and responsive layout.
- Add OrganizationService.getSharedFields()/getQueryThreshold() and
AnalysisService.getUsedColumns(), reusing existing v3 endpoints
(organizations/{id}/shared_fields, organizations/{id}/query_threshold,
analyses/used_columns) and the existing updateSettings() save flow.
No new backend endpoints added.
- Wire up route + nav entry in organizations/settings.
- Add missing Transloco keys to public/i18n/en_US.json (reused ~30
existing legacy strings, added 12 new ones for parity/validation).
- Update MIGRATION.md and copilot-instructions.md to move Organization
Sharing from "not yet migrated" to "already migrated".
Validated with pnpm lint / pnpm build, and live-tested end-to-end
(save/reload, validation, non-owner permission block, dark mode,
mobile layout) against a throwaway backend with seeded property/tax
lot data via Playwright.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nllong
added a commit
to SEED-platform/seed
that referenced
this pull request
Jul 30, 2026
Points at SEED-platform/seed-angular#77, which ports the legacy Organization Sharing settings page (/accounts/:organization_id/sharing) to the new Angular app under organizations/settings/sharing. No backend/legacy AngularJS changes; reuses existing v3 endpoints only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t buttons - SharingComponent now also fetches the org's full column catalog (ColumnService) so an "Add a field" autocomplete can append any Property/Tax Lot column to the sharable list, even ones without data yet (previously the table only showed already-populated "used" columns). - Also keeps a previously-shared column visible even if its data was later cleared, instead of silently unsharing it on save. - Added icon-button "Test" controls next to the public JSON/HTML feed URLs that open them in a new tab via window.open() (a plain <a target="_blank"> gets overridden back to same-tab by the app-wide ExternalLinkDirective for same-origin links). - Clarified in-template documentation/comments and the PUBLIC_SHARE_FIELDS_HELP copy on how rows are populated and how to add new ones. - Added new Transloco keys to en_US.json. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Ports the legacy Organization Sharing settings page into the Angular app under organizations/settings/sharing, including public feed URL documentation, query-threshold configuration, and a field-sharing selection UI backed by existing /api/v3/ endpoints.
Changes:
- Added a new Organization Sharing settings route + navigation entry under Organization Settings.
- Implemented a new Sharing settings UI (public feed status, URL docs/test buttons, query threshold form, sharable-fields table + “Add a field” autocomplete).
- Extended API layer types/services to fetch shared fields, query threshold, and “used columns” for the sharing UI.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/modules/organizations/settings/sharing/sharing.component.ts | New Sharing page component: loads sharing data, handles filtering/selection, saves org settings. |
| src/app/modules/organizations/settings/sharing/sharing.component.html | New Sharing page template: public feed status/docs, query threshold input, add-field autocomplete, share table + actions. |
| src/app/modules/organizations/settings/settings.routes.ts | Adds the /organizations/settings/sharing route. |
| src/app/modules/organizations/settings/settings.component.ts | Adds the Sharing entry to the settings navigation list. |
| src/@seed/api/organization/organization.types.ts | Adds query_threshold/public_fields to Organization and defines shared-fields + query-threshold response types. |
| src/@seed/api/organization/organization.service.ts | Adds getSharedFields() and getQueryThreshold() API methods. |
| src/@seed/api/analysis/analysis.types.ts | Adds UsedColumn/UsedColumnsResponse types for the used-columns endpoint. |
| src/@seed/api/analysis/analysis.service.ts | Adds getUsedColumns() API method for the sharing UI. |
| public/i18n/en_US.json | Adds new Transloco keys used by the Sharing page UI. |
| MIGRATION.md | Marks Organization Sharing as migrated and updates the route mapping notes. |
| .github/copilot-instructions.md | Updates the migration status snapshot to include Organization Sharing. |
Suppressed comments (2)
src/app/modules/organizations/settings/sharing/sharing.component.html:200
- Each per-row
mat-checkboxhas no accessible label, so assistive tech can’t tell which field is being shared. Add anaria-labelthat includes the field’s display name.
<mat-checkbox [(ngModel)]="field.public_checked" [ngModelOptions]="{ standalone: true }"></mat-checkbox>
src/app/modules/organizations/settings/sharing/sharing.component.html:95
- This heading is user-visible but isn’t passed through Transloco on a newly migrated page. Wrap it with
t(...)so it can be localized consistently.
<h3>GeoJSON</h3>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the legacy AngularJS Organization Sharing page (
/accounts/:organization_id/sharing) to this app underorganizations/settings/sharing, perMIGRATION.md.SharingComponent: public feed status banner (link to Options to enable/disable), collapsible URL/query-param docs (JSON/HTML, GeoJSON when enabled), a working Public Query Threshold field (the legacy page fetched this value but never actually rendered a control for it), a searchable/filterable public column-selection table with select-all/indeterminate state, owner +is_parentpermission gating (reusesUserService.auth$), loading/error/success states, save -> reload, dark mode, and responsive layout./api/v3/endpoints only -- no backend changes:OrganizationService.getSharedFields()->organizations/{id}/shared_fields/OrganizationService.getQueryThreshold()->organizations/{id}/query_threshold/AnalysisService.getUsedColumns()->analyses/used_columns/OrganizationService.updateSettings()->organizations/{id}/save_settings/MIGRATION.mdand.github/copilot-instructions.mdstatus lists.Screenshots
Overall page (public feed enabled, query threshold set, fields populated from seeded data):
Field search/filter + select-all (indeterminate state) interaction:
Validation
pnpm lintandpnpm buildpass.Files touched
src/app/modules/organizations/settings/sharing/sharing.component.tsand.html(new)src/app/modules/organizations/settings/settings.routes.tsandsettings.component.tssrc/@seed/api/organization/organization.service.tsandorganization.types.tssrc/@seed/api/analysis/analysis.service.tsandanalysis.types.tspublic/i18n/en_US.jsonMIGRATION.md,.github/copilot-instructions.mdRemaining risks
en_US.jsonfor local dev but still need to be registered in Lokalise (source of truth) before the nextpnpm update-translationspull, or they'll be overwritten.organization_sharingroute/controller/partial were left untouched, per migration convention.Update: "Add a field" + public URL test buttons
Follow-up based on review feedback that it wasn't clear how to add a new column to the public
list, and that testing the public feed URLs required manual copy/paste.
(
analyses/used_columns/). Added an "Add a field" autocomplete (backed by the existingColumnService.getPropertyColumns()->/api/v3/columns/endpoint, same one used by the ColumnSettings page) that lists every Property/Tax Lot column in the org and appends the picked one as
a new (unchecked) row -- so a field without data yet can still be marked public and saved.
lost all its data would silently fall out of
used_columnsand get unshared on the next save;it's now kept in the list instead.
in a new tab. Discovered along the way that a plain
<a target="_blank">to these (same-origin)URLs was being silently downgraded back to same-tab navigation by the app-wide
ExternalLinkDirective(it only forces a new tab for cross-origin links) -- worked around withan explicit
window.open()call instead.PUBLIC_SHARE_FIELDS_HELPcopy to explain howthe row list is populated and how to add to it.
en_US.json.Screenshots
Updated page with the "Add a field" control and public-URL "Test" buttons:
Typing in "Add a field" filters the org's full column catalog (not just used ones):
"Test" buttons next to the public JSON/HTML feed URLs:
Validation
pnpm lintandpnpm buildpass.via the new autocomplete, checked it and confirmed it lands in the save payload; clicked both
"Test" buttons and confirmed each opens a distinct new tab with real feed data (no console
errors, verified via
browser_tabs/browser_console_messages).