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

Create patterns examples #338

Open
wwwillchen opened this issue Jun 1, 2024 · 7 comments
Open

Create patterns examples #338

wwwillchen opened this issue Jun 1, 2024 · 7 comments
Labels
good first issues Good for first-time contributors help wanted Extra attention is needed

Comments

@wwwillchen
Copy link
Collaborator

wwwillchen commented Jun 1, 2024

This is a good issue for anyone who wants to contribute to Mesop as there's many different patterns we could add to the demo gallery!

I'm basically calling "pattern" a multi-component examples which demonstrates a common use case.

Ideas:

  • Submitting feedback (thumbs up / thumbs down + reasons)
  • SxS output rating
  • Nav menu
  • Header (text)
  • Card
  • Tile
  • Grid tile
  • Carousel
@richard-to
Copy link
Collaborator

Also things like Modal, Accordion, Tab, and Toasts could be useful (until we have the Angular Component equivalents created - Dialog, Tab, Snackbar, etc)

@wwwillchen wwwillchen added help wanted Extra attention is needed good first issues Good for first-time contributors labels Jun 12, 2024
@iiakshat

This comment was marked as resolved.

@pranshu-raj-211
Copy link

@iiakshat The issue is in the buttons for feedback
on_click is assigned the lambda function for the func call on_feedback(value), adding a variable made it work for me.

Use this in on_click - on_click=lambda _: on_feedback(True)

@richard-to
Copy link
Collaborator

Looks like you resolved your error. When I ran the colab, it seemed ran for me.


One thing to note is that Mesop event handler functions have a non-intuitive behavior if you try to reuse the same function. You should read: https://google.github.io/mesop/guides/interactivity/#avoid-using-closure-variables-in-event-handler

@srivats22
Copy link

Can anyone contribute to this and add those components??

If so I would also like to have a go at it...

@richard-to
Copy link
Collaborator

@srivats22, yes, you're right free to contribute any patterns you'd feel would be helpful.

@srivats22
Copy link

Nice, let me clone the repo and see what I can work on... and will try and get it done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issues Good for first-time contributors help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants