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

✨ Change label selector from searchable dropdown to clickable buttons #110

Merged
merged 7 commits into from
May 15, 2024

Conversation

foysalit
Copy link
Contributor

@foysalit foysalit commented May 1, 2024

  • Change the label form to use clickable buttons instead of searchable dropdown. The searchable dropdown package has been removed as dependency. Labels can still be searched and custom labels can be added.
  • Add cypress tests around the label add/remove and search behavior.
  • Refactor cypress test code to make them more shareable.
Screenshot 2024-05-13 at 21 20 23

Selectable label buttons

Screenshot 2024-05-13 at 21 20 41

Search labels and add custom label

Copy link

render bot commented May 1, 2024

Copy link

render bot commented May 1, 2024

@@ -15,6 +15,7 @@ export const Dropdown = ({
children,
items,
containerClassName,
...rest
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows us to pass params like data-cy to the wrapper component/

@@ -375,7 +375,7 @@ const EventFilterPanel = ({
type="datetime-local"
id="createdAfter"
name="createdAfter"
className="block w-full"
className="block w-full dark:[color-scheme:dark]"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The date picker, by default, adds a calendar icon in the input field. This classname ensures that the icon's color changes based on the browser's scheme.

})
}
/>
{Object.keys(reasonTypeOptions).map((typeValue) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Move the report type selector from searchable dropdown to clickable buttons just like labels.


export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
on('before:browser:launch', (browser, launchOptions) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sure the browser window is reasonably wide and tall enough so that tests can run without scrolling too much.

@foysalit foysalit changed the title 🚧 Change label selector and add expiration modal ✨ Change label selector from searchable dropdown to clickable buttons May 13, 2024
@foysalit foysalit requested review from devinivy and bnewbold May 13, 2024 19:25
Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

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

Looks good!

Let's just ensure the lint and updated cypress tests pass here. Seems like they hung on the first run, so I've restarted them.

@foysalit foysalit merged commit c65e4d9 into main May 15, 2024
3 checks passed
@matthieusieben matthieusieben deleted the label-with-expiry branch November 15, 2024 14:55
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.

2 participants