-
Notifications
You must be signed in to change notification settings - Fork 15
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
Link timings and tests #399
Conversation
# Conflicts: # report-ng/app/src/components/timings/test-timings/test-timings.ts
report-ng/app/src/components/timings/test-timings/test-timings.ts
Outdated
Show resolved
Hide resolved
report-ng/app/src/value-converters/chip-class-value-converter.ts
Outdated
Show resolved
Hide resolved
} | ||
|
||
interface IChip { | ||
chipElement?: any; |
There was a problem hiding this comment.
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){ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Please create new branches in the future and do not reuse old ones. |
…xed navigation from dashboard
@@ -21,7 +21,6 @@ | |||
|
|||
<template> | |||
<require from="../../value-converters/chip-name-value-converter"></require> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still necessary?
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
report-ng/app/src/value-converters/chip-name-value-converter.ts
Outdated
Show resolved
Hide resolved
report-ng/app/src/value-converters/chip-name-value-converter.ts
Outdated
Show resolved
Hide resolved
report-ng/app/src/value-converters/chip-name-value-converter.ts
Outdated
Show resolved
Hide resolved
@mreiche From my side its ok and ready to merge. |
Description
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Checklist: