Skip to content

Fix subdomain preservation in DomainPicker when switching base domains#1383

Closed
arevindh wants to merge 5 commits into
fosrl:devfrom
arevindh:fix-domain-picker-issue
Closed

Fix subdomain preservation in DomainPicker when switching base domains#1383
arevindh wants to merge 5 commits into
fosrl:devfrom
arevindh:fix-domain-picker-issue

Conversation

@arevindh

Copy link
Copy Markdown

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

When a user typed a subdomain and then selected a different base domain, the subdomain value was being cleared due to onDomainChange being called with subdomain: undefined.

How to test?

  • User need to to have more than 1 domain to test.
  • Type subdomain first then change the base domain.
  • If the subdomain is valid for the new base domain, the subdomain should be preserved

This should be tested on Create Resource Page and General Section of Resource Settings

@arevindh arevindh changed the base branch from main to dev August 29, 2025 18:06
@Pallavikumarimdb

Copy link
Copy Markdown
Contributor

Hi @arevindh , I had a look at your fix. I see you’re clearing the subdomain input whenever the base domain is edited after a subdomain has already been entered. That definitely avoids the case where only the base domain gets saved, but it puts the burden back on the user since they need to re-enter the subdomain.

I’ve already opened a PR with an alternative approach here: #1375 for similar issue. Could you verify if this resolves your concern as well?

@arevindh

arevindh commented Aug 30, 2025

Copy link
Copy Markdown
Author

Hi @arevindh , I had a look at your fix. I see you’re clearing the subdomain input whenever the base domain is edited after a subdomain has already been entered. That definitely avoids the case where only the base domain gets saved, but it puts the burden back on the user since they need to re-enter the subdomain.

I’ve already opened a PR with an alternative approach here: #1375 for similar issue. Could you verify if this resolves your concern as well?

I haven't looked at your PR, but the subdomain does not get cleared if its valid.

pangolin-1

@oschwartz10612

Copy link
Copy Markdown
Member

Thanks so much @arevindh but I think it was solved in #1375. I appreciate the contribution!

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.

3 participants