[PR #1375] [MERGED] Preserve subdomain input when selecting a base domain #2531

Closed
opened 2026-04-16 09:27:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/1375
Author: @Pallavikumarimdb
Created: 8/28/2025
Status: Merged
Merged: 8/30/2025
Merged by: @oschwartz10612

Base: devHead: Fix/domain-picker-issue


📝 Commits (5)

  • bc335d1 preserve subdomain with sanitizeSubdomain and validateSubdomain
  • 18bb6ca allows typing flow while providing helpful validation
  • e8a6efd subdomain validation consistent
  • 54764df unify subdomain validation schema to handle edge cases
  • e3bd3fb consistent full domain

📊 Changes

4 files changed (+179 additions, -106 deletions)

View changed files

📝 server/lib/schemas.ts (+4 -3)
📝 src/app/[orgId]/settings/resources/[resourceId]/general/page.tsx (+21 -12)
📝 src/components/DomainPicker.tsx (+95 -91)
src/lib/subdomain-utils.ts (+59 -0)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

This PR resolves #1373 and #1369 , where a subdomain entered before selecting a base domain was not saved when creating or editing a resource.

Changes introduced:

  • Users can safely type a subdomain before choosing a base domain without losing input.
  • Subdomain change and base domain selection now both trigger validation → ensuring state stays in sync regardless of order of operations.
  • Improved subdomain validation to ensure consistency across inputs.
  • The subdomain is sanitized (invalid characters removed).
  • If compatible, it is preserved and combined with the base domain.

How to test?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/1375 **Author:** [@Pallavikumarimdb](https://github.com/Pallavikumarimdb) **Created:** 8/28/2025 **Status:** ✅ Merged **Merged:** 8/30/2025 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `dev` ← **Head:** `Fix/domain-picker-issue` --- ### 📝 Commits (5) - [`bc335d1`](https://github.com/fosrl/pangolin/commit/bc335d15c05a7bce8ece4b581aacd98053f59682) preserve subdomain with sanitizeSubdomain and validateSubdomain - [`18bb6ca`](https://github.com/fosrl/pangolin/commit/18bb6caf8fa7df048090d82a07686214ce36c589) allows typing flow while providing helpful validation - [`e8a6efd`](https://github.com/fosrl/pangolin/commit/e8a6efd079877e96ee954624b63743a97405de0c) subdomain validation consistent - [`54764df`](https://github.com/fosrl/pangolin/commit/54764dfacd8fd5e691608fe85baa06b6098d5e2b) unify subdomain validation schema to handle edge cases - [`e3bd3fb`](https://github.com/fosrl/pangolin/commit/e3bd3fb985d99679c53b73a27bff79e4e7c4e90a) consistent full domain ### 📊 Changes **4 files changed** (+179 additions, -106 deletions) <details> <summary>View changed files</summary> 📝 `server/lib/schemas.ts` (+4 -3) 📝 `src/app/[orgId]/settings/resources/[resourceId]/general/page.tsx` (+21 -12) 📝 `src/components/DomainPicker.tsx` (+95 -91) ➕ `src/lib/subdomain-utils.ts` (+59 -0) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description This PR resolves #1373 and #1369 , where a subdomain entered before selecting a base domain was not saved when creating or editing a resource. **Changes introduced:** - Users can safely type a subdomain before choosing a base domain without losing input. - Subdomain change and base domain selection now both trigger validation → ensuring state stays in sync regardless of order of operations. - Improved subdomain validation to ensure consistency across inputs. - The subdomain is sanitized (invalid characters removed). - If compatible, it is preserved and combined with the base domain. ## How to test? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 09:27:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#2531