d3-flame-graph icon indicating copy to clipboard operation
d3-flame-graph copied to clipboard

ignore case on search

Open spiermar opened this issue 4 years ago • 7 comments

spiermar avatar Nov 21 '19 17:11 spiermar

@spiermar I would like to work on this issue. Could you please provide more description?

rohchakr avatar Apr 18 '20 13:04 rohchakr

Sure @rohchakr. Should be a simple feature. Today, search is done via RegEx and is case sensitive. Having an option to ignore case on search would be beneficial.

With the current default search, if I have a frame named "Test" for example, and I type "test" on search, it would not match because of the uppercase T.

We could add an option to the chart to enable this feature and just lower the case of case of both search and frame names on comparison if enabled.

spiermar avatar Apr 18 '20 16:04 spiermar

Thanks a lot. Getting started! Please assign this issue to me.

rohchakr avatar Apr 19 '20 08:04 rohchakr

@spiermar Created a PR #154 for validating the approach. Please guide further.

rohchakr avatar Apr 19 '20 11:04 rohchakr

I am thinking of having a checkbox just beside the search button to choose whether to make case-sensitive search or not.

rohchakr avatar Apr 19 '20 11:04 rohchakr

It could be just a library option. No need to update the examples, just document it on the README.

spiermar avatar Apr 19 '20 17:04 spiermar

@spiermar Created a new PR #155 Introduced an optional argument for the function searchMatch and made necessary updates in the readme file. Please review.

rohchakr avatar Apr 20 '20 13:04 rohchakr