Code Monkey home page Code Monkey logo

Comments (5)

grigasp avatar grigasp commented on June 29, 2024

This happens because filtering is being done on the backend using default label rules, but ID suffixes are dropped on the frontend. I think suffixes should be dropped by modifying the ruleset instead.

Having said that, the @itwin/breakdown-trees-react package doesn't have a maintainer at the moment, so I'm not sure if we have anyone willing to work on this.

from viewer-components-react.

muthubentley avatar muthubentley commented on June 29, 2024

@grigasp I understand dropping the ID on frontend is the reason. But user says there is a specific case that has to be addressed. Say the user uses InstanceLabelOverride and sets the label to UserLabel. In the tree when the UserLabel could not be calculated then the value in 「Presentation.json」の「label.notSpecified」is displayed. User has set this value to "Not specified". This value is not searchable and this will occur in any tree not just @itwin/breakdown-trees-react package.
Take a look at below tree:
image
When I search using "Not specified" nothing shows up:
image
Whereas if just input "not" in the search box, the same node gets filtered:
image

User feels this is bit confusing for them. Is it possible to make the text that is displayed in the tree searchable. In this case "Not specified" should filter out to that one node.

from viewer-components-react.

grigasp avatar grigasp commented on June 29, 2024

This is an interesting problem...

As I mentioned earlier, filtering is being performed on the backend against the created hierarchy. The "Not specified" label is assigned to nodes that don't have a label, but instead of assigning an English string, we assign a localized string identifier (in this specific case - @Presentation:label.notSpecified@). The string gets translated to user's language on the frontend and the result may not even be close to the identifier (e.g. in Lithuanian it would be "Nenurodyta") and to make things worse - users could enter just a substring of that.

I think to make this totally correct we should:

  1. Match user's input against localized strings used in the hierarchy.
  2. In case there are matches, include their keys in the list of substrings we look for when filtering.

This is a bit more complicated than it may sound as the required APIs don't exist today - there's no way to get a list of all localized strings on the frontend for step 1 and the filtering request currently accepts only 1 filter string while we may need more for step 2.

I'm also not sure this is a big problem - wouldn't it be better to assign fallback values for labels to see at least some useful information instead of "Not specified"? E.g. another property like CodeValue or class label...

from viewer-components-react.

grigasp avatar grigasp commented on June 29, 2024

FWIW, I filed an issue in our backlog to make sure we support this situation in the new hierarchies builder implementation we've been working on lately.

from viewer-components-react.

muthubentley avatar muthubentley commented on June 29, 2024

Thanks for creating a backlog. I understand it is complex. Let me check the priority with user.

from viewer-components-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.