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

Show indication when no labels are found #183

Merged
merged 4 commits into from
Jul 23, 2023

Conversation

seetohjinwei
Copy link
Contributor

Summary:

Fixes #164

Type of change:

  • ✨ New Feature/ Enhancement

Changes Made:

  • Show indication of "No Labels Found!" when no labels are found.
  • The styling is chosen to look similar to the button above.

Screenshots:

Screen.Recording.2023-07-22.at.13.54.02.mov

Proposed Commit Message:

Show indication when no labels are found

Previously, when no labels are found, there was no indication.

Let's
* Show an indication when no labels match the input
* Show an indication when the repository has no labels

Checklist:

  • I have tested my changes thoroughly.
  • I have created tests for any new code files created in this PR or provided a link to a issue/PR that addresses this.
  • I have added or modified code comments to improve code readability where necessary.
  • I have updated the project's documentation as necessary.

Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

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

Just a small nitpick

Comment on lines 98 to 102
hasNoLabels(filter: string): boolean {
if (this.allLabels === undefined || this.allLabels.length === 0) {
return true;
}
return this.allLabels.every((label) => this.filter(filter, label.name));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Prefer to use .some and invert the boolean

As long as one label is shown, do not show the No Labels text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made the change!

Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

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

LGTM

@gycgabriel gycgabriel merged commit cbf8c82 into CATcher-org:main Jul 23, 2023
3 checks passed
@chia-yh chia-yh mentioned this pull request Jul 24, 2023
4 tasks
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.

No indication that there are no labels found
2 participants