Skip to content

Conversation

@AureMonke
Copy link
Contributor

  1. Removed repetitive withSchemaReferences from queries
  2. Fix for labels of some classes are different when loading the same schema using JSON and Incremental locater

@StefanApfel-Bentley StefanApfel-Bentley changed the title Removed shema references from multiple/single queries Removed schema references from multiple/single queries Nov 11, 2025
@StefanApfel-Bentley StefanApfel-Bentley marked this pull request as ready for review November 11, 2025 15:07
import { IncrementalSchemaReader } from "./IncrementalSchemaReader";

interface IncrementalSchemaInfo extends SchemaInfo {
export interface IncrementalSchemaInfo extends SchemaInfo {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking, shouldn't that rather be internal? We don't want to use it outside of itwinjs.

@StefanApfel-Bentley
Copy link
Contributor

Don't forget to do an extract-api, we changed a few interfaces.

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2025

This pull request is now in conflicts. Could you fix it @AureMonke? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

}
}

private decodeNameToDisplayLabel(props: MutableClassProps | MutablePropertyProps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be improved. The "ecNameRegex" is already defined in ECName, it's actually a "replaced character as hex"-regex.
You could just always call ECName.decode, and it would do nothing if the regex doesn't match. No need to duplicate the regex into this method, I think the logic remains the same without the regex.

Copy link
Contributor

Choose a reason for hiding this comment

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

Edit: Ah now I see why this. You only want to set the label if there are any encoded chars in the name.
In that case we should add a method for it to ECName, so we don't have to copy the regex. Something like ECName.hasEncodedCharacters() : bool

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.

4 participants