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

Link timings and tests #399

Merged

Conversation

selinanatschke-mms
Copy link
Collaborator

Description

  • new filter functionality including a list of chips that are displayed below the usual filter selections and show what filters are currently used
  • available chip types: clear all, status, class, custom text (free text search), custom filter (when navigating from timings or failure aspects view)
  • chips can be removed by clicking on the chip or using the clear all chip
  • added chipNameValueConverter
    • uses classNameValueConverter and statusNameValueConverter
    • differentiates text on the chip or tooltiptext
  • added chipClassValueConverter for color encoding
    • color encoding: blue for status filter chips, turquoise for class filter chips, purple for free text search chips, defautl grey for all other chip types
  • implemented functionality to search classes with free text
  • after filtering classes the chosen classes will not appear in select box anymore
  • when navigating from timings view: click on a bar => navigate to test view + methods that are represented in bar are filtered in tests view
  • when navigating from failure aspects view:
    • click on failure aspect: methods with that failure aspect are filtered
    • click on "failed" badge: methods with that failure aspect are filtered and "failed" status is filtered

image

Fixes # (issue)

  • alphabetically sort filter class select options

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@martingrossmann
Copy link
Contributor

martingrossmann commented Feb 29, 2024

I found some issues:

  • Clicking on a class bar on dashboard should show a filtered test list. But currently the status is not set correctly:
    image
  • The place between the select boxes and the test table is not big enough. After settting a filter the table is moved down by some pixels. I suppose to keep enough place for the first row of chips to prevent a "shaky" page.
  • The text searches are compined with OR but needs to be combined with AND.
  • Please have a look to the report tests which need an update. Maybe we also need some additional tests.

}

interface IChip {
chipElement?: any;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we are in the context of a chip, you can remove redundant identifiers: chipElement -> element. Also consider to set the element base type to element: HTMLElement

this._filter()
}

private _convertQueryParams(params, toArray: boolean){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you explain what this method does exactly?
When you want to use multiple values for query parameters, the standard approach would be, to have multiple query parameters with the same name like:
/my-url?q=Search1&q=Search2&class=Class1&class=Class3
This should be supported by any modern framework. Please also see: https://stackoverflow.com/questions/724526/how-to-pass-multiple-parameters-in-a-querystring

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used it to display multiple statuses like status=1~2~3 instead of status=%2C1%2C2 or similar, because the url encoding displayed arrays with filling characters like %2C. The ~ should be like a separator. I chose this with Martin to make the url shorter. It will not be necessary anymore when i implemented your suggestion

for the implementation i have a question and i could not really find an answer online:
If i already have status=4 in my url so i have this.queryParams.status = 4, how do i add a second one so that my url says status=4&status=7 ?
I tried this.queryParams.status = 7 but this just overwrites the 4 in the url, and this.queryParams.status.push or append does not work neither. Using this.queryParams["status"] also has the same results

Do you have any hints or am I misunderstanding something?

@mreiche
Copy link
Collaborator

mreiche commented Mar 1, 2024

Please create new branches in the future and do not reuse old ones.

@martingrossmann martingrossmann added this to the 2.8 milestone Apr 10, 2024
@selinanatschke-mms selinanatschke-mms marked this pull request as draft April 25, 2024 07:47
@selinanatschke-mms selinanatschke-mms marked this pull request as ready for review May 6, 2024 07:11
@@ -21,7 +21,6 @@

<template>
<require from="../../value-converters/chip-name-value-converter"></require>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this still necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it is because the values in filters cannot be directly used. Depending on the chip type it needs to be for example "Custom Filter" or "Passed" and for status and Class we need to use other ValueConverter additionally to display the chip labels correctly. All this is handled in the ChipNameValueConverter

const filter = this.filters.find(filter => filter.type == type);

if(type != 'config' && type != 'methods'){
this.queryParams[type].split("~").forEach(param => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use standard methods for passing multiple URL query parameters. No custom delimiter magic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't figure out a better way to modify the queryparams, because the way you proposed earlier is not working (or i could not make it work, here the problem again: #399 (comment))

What would you propose instead?


type Filter = {
type: FilterType,
cssClass: string,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could have "name" property as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See comment for ChipNameValueConverter
=> that is why i removed name property, because this way it would not be used anywhere

@selinanatschke-mms selinanatschke-mms marked this pull request as draft May 7, 2024 06:40
@selinanatschke-mms selinanatschke-mms marked this pull request as ready for review May 13, 2024 06:36
@martingrossmann
Copy link
Contributor

@mreiche From my side its ok and ready to merge.

@martingrossmann martingrossmann merged commit 418e301 into telekom:master May 24, 2024
@selinanatschke-mms selinanatschke-mms deleted the link_timings_and_tests branch May 27, 2024 08:56
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