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

Add side panel (without unrelated changes) #585

Merged
merged 18 commits into from
Feb 25, 2025
Merged

Conversation

Strift
Copy link
Collaborator

@Strift Strift commented Feb 24, 2025

Hi @mdubus, apologies for the huge PR earlier.

This PR should be easier to review. It replaces #580.

Related issue

Fixes partially meilisearch/meilisearch#5361

What does this PR do?

Adds a side-panel on the right of the app which contains

  • The link to Meilisearch Cloud
  • The help center
  • A form to register to the newsletter

Removes

  • the Meilisearch Cloud banner
  • the help center button

Address the first round of feedback on #580

The Modal is still displayed even if I entered my API Key. I think it should be preferable to hide it if the API key is valid, as it was the case before.

☑️ Removed all changes on the API key modal, so I restored the previous behavior.

On a 13" screen, I'm unable to see the input to add my email address

☑️ Added the ability to scroll in the side panel.

By reading this I was expecting a closing icon, but in fact I see the hamburger icon instead. Maybe we want to dynamically change the icon from hamburger <> cross. WDYT?

☑️ The side panel now uses a close (cross) icon instead of a hamburger.

I suggest you create a Cypress command for this, to avoid repeating it from file to file ;)

☑️ Created a Cypress command to store the API token to local storage.

@Strift Strift changed the title Add side panel (no unrelated changes) Add side panel (without unrelated changes) Feb 24, 2025
@Strift Strift marked this pull request as draft February 24, 2025 04:53
@Strift Strift mentioned this pull request Feb 24, 2025
3 tasks
@Strift Strift marked this pull request as ready for review February 24, 2025 05:37
Copy link
Member

@mdubus mdubus left a comment

Choose a reason for hiding this comment

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

Thank you so much for having split the big PR in different ones, it makes a huge difference for me 🥺

Below are a few feedback:

You're missing a background-color on the panel ;)
Capture d’écran 2025-02-24 à 15 17 31


I don't know what "heroicons" is, but here is how I managed icons in this repository:

  • I put my svg in the icons/svg folder
  • I run yarn icons
  • It transforms the SVG into react components that I can use in my app

I'm not against using a different system, but I'd be in favor or consistency especially since this repo is an open-source one :)


I submitted a weird email address for the newletter (like [email protected]) and it got submitted successfully. I don't know how we plan to handle those but raising it just in case :)


I submitted the newsletter form successfully and wanted to fill it again, but even when I closed the panel and reopened it, I didn't have the input anymore, just the success message. Should we "reset" the state when we close the panel ?


The panel is opened by default. If I refresh my page, it opens. I'm afraid this behaviour could be annoying for our users. What would you think of opening it by default unless the user previously closed it? We could store a variable in the localStorage for that :)


Apart from those small things it's working well 🚀
Thanks a lot for your work here 🙌

}
`

const Input = styled.input`
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, why didn't you use the Input component and override its style if needed?

}
`

const Button = styled.button`
Copy link
Member

Choose a reason for hiding this comment

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

Same question as for the Input :)

@Strift
Copy link
Collaborator Author

Strift commented Feb 25, 2025

Hey, thanks for the review.

I fixed the errors. For the improvements, I would recommend doing that in an update if they're not essential. Especially since @curquiza wants to do the release today.


You're missing a background-color on the panel ;)

☑️ Indeed, the theme.js was missing the white color. Added!


I'm not against using a different system, but I'd be in favor or consistency especially since this repo is an open-source one

I didn't see the point of keeping both the SVG and the components. So I directly saved the SVGs in components.
What was the motivation behind that?

(Heroicons is just an icon library, I named the folder like this so it's more self-documenting.)


I submitted a weird email address and it got submitted successfully

Yes, we agreed to roll it out like this and update it later if needed.

Should we "reset" the state when we close the panel ?

I don't think it's an important user journey, so I would recommend doing that in an update.

If I refresh my page, it opens. I'm afraid this behaviour could be annoying for our users. What would you think of opening it by default unless the user previously closed it? We could store a variable in the localStorage for that :)

I'm not sure that's what @meilisearch/product-team wants. But I think it would be a welcome improvement.

Copy link
Member

@mdubus mdubus left a comment

Choose a reason for hiding this comment

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

Approving since I don't want to block the release, but I suggest to keep track of the enhancements in an issue so that we can tackle them later :)

@Strift
Copy link
Collaborator Author

Strift commented Feb 25, 2025

Thanks for the quick review! I create the following issues to track the possible enhancements:

@Strift Strift merged commit 80a0315 into main Feb 25, 2025
4 checks passed
@Strift Strift deleted the feat/add-side-panel-clean branch February 25, 2025 11:40
@Strift Strift added the enhancement New feature or request label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants