Skip to content

[Experimental] Modify filter glob#7

Open
Punpun1643 wants to merge 19 commits intomasterfrom
modify-filter-glob
Open

[Experimental] Modify filter glob#7
Punpun1643 wants to merge 19 commits intomasterfrom
modify-filter-glob

Conversation

@Punpun1643
Copy link
Owner

@Punpun1643 Punpun1643 commented Jun 18, 2022

Proposed commit message

Current filter only allow for filtering based on file types or glob. This limits the user from doing
both form of filtering at the same time (i.e. filter glob first, then filter the file types
to see the globs that are in each file types)

To improve the UX, a reset button is implemented so that filtering could be reset.

Let's implement filtering such that both filterings can be done at the same time. 
And modify the UI to facilitate UX during filtering.

Other information

Pre-modification behaviour

  • Glob filter search result will be reset when there are changes to the file types (i.e. cannot maintain search result from glob filter and proceed to filter based on file types to obtain search results that are filtered based on both glob and file types
  • Can either do filter based on search or file types not both as searchBarValue will be reset to the default value
pre-modification.mp4

Post-modification behaviour

  • Remove radio-button as currently seem like they are not used
  • Allow filtering by both glob and file types at the same time. This is done through:
  1. Modify indicateCheckBoxes such that once called searchBarValue is not reset and keep the current value
  2. Modify indicateSearchBar such that selectedFileTypes is kept at the current state
  • Implement a reset filter button to reset all filters to the default state where all file types are selected and searchBarValue is reset to empty
post-modification.mp4

Miscellaneous

  • Increase the width of glob filter input

EB9B7413-1242-47BF-93B5-DB821044CFCC_4_5005_c

  • Vertically aligned glob filter input and filter button when the viewport is small

F27FC5EF-5DCA-436E-B8D0-5022D655948E

  • Add dynamic check/uncheck tooltip to file types. This improves the user experience especially when the radio-button is removed
    158968B4-0CA3-44A9-92C5-C9571F8B11B3_4_5005_c
    F1ADF57D-2F4C-40FE-ABC7-43B976F32053_4_5005_c
    ECEC70FC-A0E8-4269-9EE3-8F5542DD8FD7_4_5005_c

Punpun1643 and others added 16 commits June 6, 2022 22:39
…ense#1776)

The use of Instant.ofEpochMilli(Long.MIN_VALUE) as the arbitrary first
commit date now fails shallow cloning for
testSinceBeginningDateRangeWithShallowCloning system test.

In addition, using this arbitrary date in convertToGitDateRangeArgs
when converting timezone results in an overflow causing sinceDate to
be greater than untilDate. Thus, no commit results are retrieved,
leading to failing system tests.

Also, the arbitrary first commit date is in UTC. However, in the
convertToGitDateRangeArgs method, the zoneId used for the conversion
is from the config, which may be different. This leads to an erroneous
timezone conversion.

Finally, using --since d1 with --period results in an unintended date
range because the --period and the arbitrary commit date from 
--since d1 are used to calculate the until date as the actual 
earliest commit date is not immediately available.

Let's change Instant.ofEpochMilli() to use 0 so that the arbitrary date
is 1970-01-01 and the overflow of the sinceDate can be avoided.

At the same time, let's convert the arbitrary date to the correct
timezone within the ArgsParser class and add a component test for
parsing --since d1 to check that the correct timezone is used for each
RepoConfiguration before cloning any repos.

Finally, let's raise a warning when --since d1 is being used with 
--period.
@Punpun1643 Punpun1643 changed the title Modify filter glob [Experimental] Modify filter glob Jun 18, 2022
@Punpun1643 Punpun1643 marked this pull request as ready for review June 19, 2022 08:26
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