Skip to content

Conversation

@wdoconnell
Copy link
Contributor

In local testing, if I simulate the conditions of being a new IOx org, clicking the settings link gives me a 404. The reason is that the link is still hardcoded to send the user to variables by default, which won't exist for new IOx orgs.

Solution is to send the user to labels by default if it's a new IOx org.

Checklist

Authors and Reviewer(s), please verify the following:

  • A PR description, regardless of the triviality of this change, that communicates the value of this PR
  • Well-formatted conventional commit messages that provide context into the change
  • Documentation updated or issue created (provide link to issue/PR)
  • Signed CLA (if not already signed)
  • Feature flagged, if applicable

@wdoconnell wdoconnell changed the title Remove settings pg variable default fix: Settings page sends user to settings/labels in new iox orgs Jan 30, 2023
@wdoconnell wdoconnell marked this pull request as ready for review January 30, 2023 18:10
@wdoconnell wdoconnell requested a review from a team as a code owner January 30, 2023 18:10
exact
path={`${orgPath}/${SETTINGS}`}
component={VariablesIndex}
component={isNewIOxOrg ? LabelsIndex : VariablesIndex}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of conditionally rendering variables or labels, (which will persist after the conditions that require the conditional are gone) why don't we just make Labels the default page under settings? That way it'll just work, whether the org has variables or not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that - it'll just mean it changes the UI experience for users who aren't new IOx.

@garylfowler @gunnaraasen Does it matter whether the "Labels" page or the "Variables" page renders by default when users visit Settings? If we switch from Variables to "Labels" we won't need a different routing behavior for the "Settings" page depending on whether the user is in a New IOx org or not.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless they disagree, I'm inclined to leave it as-is for now, just because Labels isn't the first tab. Reordering the tabs out of alpha order seems like a little yak-shave-y for just fixing the default page.

@wdoconnell
Copy link
Contributor Author

@hoorayimhelping Ended up going with your approach, it's simpler. 👍

Copy link
Member

@blegesse-w blegesse-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wdoconnell wdoconnell added this pull request to the merge queue Jan 30, 2023
Merged via the queue into master with commit 0a046a1 Jan 30, 2023
@wdoconnell wdoconnell deleted the remove_settings_pg_variable_default branch January 30, 2023 22:58
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.

5 participants