Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test execution search and query params #141

Merged
merged 11 commits into from
Mar 21, 2024

Conversation

omar-selo
Copy link
Collaborator

@omar-selo omar-selo commented Mar 20, 2024

Resolves RTW-244 and closes #140 and #121

Changes:

  • Refactor filters and search components to be reused across dashboard and artefact page
  • In artefact page, add search by environment name (note Ctrl+F focuses on this search box :) )
  • In artefact page, persist search and filters as query parameters in url
  • Fix bug indicated by The button for "apply" filters is not show on small screens #140
  • Fix bug where approving or rejecting a testexecution/environment causes the filters to reset
Screencast.from.2024-03-20.15-07-31.webm

Copy link
Contributor

@andrejvelichkovski andrejvelichkovski left a comment

Choose a reason for hiding this comment

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

LGTM! No complains about the code, but I will let @nadzyah also review the code and +1 it 😄

@@ -13,38 +13,38 @@ class FindShortcut extends ConsumerWidget {

@override
Widget build(BuildContext context, WidgetRef ref) {
final shouldActivateShortcut = AppRoutes.isAtDashboardPage(context);
final shouldMakeFiltersVisible =
AppRoutes.isDashboardPage(AppRoutes.uriFromContext(context));
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, do we want to bind ctrl+f to the search bar on each artefact page, or just in the dashboard page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ctrl+f does work on both pages now. This condition is to display the hidden filters on dashboard page

Comment on lines 22 to 25
return emptyArtefactFilters
.copyWithOptionsExtracted(artefacts)
.copyWithQueryParams(pageUri.queryParametersAll);
} else if (AppRoutes.isArtefactPage(pageUri)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess you don't need an else statement after return

Comment on lines 33 to 36
return emptyTestExecutionFilters
.copyWithOptionsExtracted(testExecutions)
.copyWithQueryParams(pageUri.queryParametersAll);
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Comment on lines 75 to 76
return uri.pathSegments[1].toInt();
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

And here?

@omar-selo omar-selo requested a review from nadzyah March 21, 2024 07:58
Copy link
Collaborator

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

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

Thanks for the opportunity to review the PR!

@omar-selo omar-selo merged commit 37642d1 into main Mar 21, 2024
1 of 2 checks passed
@omar-selo omar-selo deleted the test-execution-search-and-query-params branch March 21, 2024 08:17
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.

The button for "apply" filters is not show on small screens
3 participants