Skip to content

GitHub Issue 1470: Manage Templates end up with sample type not usable in Apps - #2067

Open
XingY wants to merge 2 commits into
developfrom
fb_issue1470
Open

GitHub Issue 1470: Manage Templates end up with sample type not usable in Apps#2067
XingY wants to merge 2 commits into
developfrom
fb_issue1470

Conversation

@XingY

@XingY XingY commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Rationale

Related Pull Requests

Changes

  • added useSourceTypeParam and useSampleTypeParam hooks to get resolved data type names with correct casing from url param
  • invalidateQueryDetailsCache had an exactKeyMatch code path that's never used, this PR removes it
  • Updated invalidateQueryDetailsCache to remove case insensitive keys
  • Changed QueryModel.schema/queryName to favor resolved queryInfo.schemaQuery, over raw schemaQuery

@XingY
XingY requested a review from labkey-alan August 27, 2026 03:05

@labkey-alan labkey-alan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall this looks good, but I would use useLoadableState in the added hook to cut down on boilerplate.

const [queryInfo, setQueryInfo] = useState<QueryInfo>();
const [error, setError] = useState<string>();
const [notFound, setNotFound] = useState(false);
const [loadingState, setLoadingState] = useState<LoadingState>(LoadingState.INITIALIZED);

@labkey-alan labkey-alan Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would recommend using useLoadableState which will handle most of the boilerplate in this hook around tracking loading state.

Edit: Actually it would probably be even more concise to use useQueryInfo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, I was going to say. useQueryInfo is very similar to this.

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