Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What about the other uses of label.name instead of formattedName, will there be any edge cases from changing only the value here?
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.
This
value
being changed tolabel.formattedName
only affects the values inLabelFilterBarComponent::selectedLabelNames
. It is only used internally, to update the value of the behaviour subject fieldLabelFilterBarComponent::selectedLabels
. InLabelFilterBarComponent::simulateClick
andLabelFilterBar::updateSelection
methods:LabelFilterBarComponent::updateSelection
value is an@Input
field. When looking for places that this component is used, it is only used inFilterBarComponent
, infilter-bar.component.html
:Hence any changes to
LabelFilterBarComponent::selectedLabels
will only cause a change toFilterBarComponent::labelFilter$
. Looking at the places that this field is used, it is only used inFilterBarComponent::ngAfterViewInit
, which subscribes to changes to this field:On every change, the
FilterBarComponent::dropdownFilter.labels
is changed, and thenapplyDropdownFilter
is called, where the filter in each of theviews$
are updated toFilterBarComponent::dropdownFilter
. Here, theviews$
are the child components that are filterable. It is an@Input
field. Looking at places whereFilterBarComponent
is used, only inissue-viewer.component.html
:The value of
FilterBarComponent::views$
takes the value ofIssueViewer::views
.IssueViewer::views
is a field that follows the value ofIssueViewer::cardViews
:Which in turn is a
@ViewChildren
component that is of typeQueryList<CardViewComponent>
! This means that any change toFilterBarComponent::dropdownFilter
will cause a change to the filters of allCardViewComponent
s withinIssueViewer
.TLDR, in short, the change of
value
fromlabel.name
tolabel.formattedName
only means that allCardViewComponent
s filter bylabel.formattedName
instead oflabel.name
. Note thatCardViewComponent
has selectorapp-view-card
, so to double check where this change will affect, paste the following code to the browser's console when opening the app:We see that the
CardViewComponent
s are only the columns of the contributors of the current repo. This is the only component that takes the intended effect of the change.I realised that the
LabelFilterBarComponent::hiddenLabelNames
needs a similar change. Similar to what I have explained above, theCardViewComponent
s are the only component that takes the intended effect of the change. However, looks like it only hide the labels. I'm not sure if this is the intended behaviour of the hiding feature, if it not, there needs to be a change to how theCardViewComponent
s make use of thefilter.hiddenLabels
.After hiding the label
difficulty.Easy
: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.
To confirm, what did you think the hiding feature should do? We might want to reconsider how we present the features or change the feature if it doesn't make intuitive sense to the user
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 think it should hide the issues & PRs that have the tag, instead of simply hide the tag from the page. I have posted a new issue on this at #240.