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

library: Ported Menu Button in rust #552

Merged
merged 11 commits into from
Aug 30, 2023

Conversation

mbilal234
Copy link
Contributor

Added menu button implementation in rust.
Preview looks fine, but two errors are seen on the console that I cant seem to understand what they are about
They dont seem to effect the preview or Rust code.
image

Review please!

Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

A couple of small things, then it looks good :)

src/Library/demos/Menu Button/code.rs Outdated Show resolved Hide resolved
let primary_button: Button = workbench::builder()
.object("primary")
.expect("Failed to get primary_button");
let secondary_button: Button = workbench::builder()
Copy link
Contributor

Choose a reason for hiding this comment

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

That should be a MenuButton not a Button

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check now pls

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you tried the code?
it doesn't look like it would work. I also don't think it's formatted.

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 forgot to add an import, it works on my side now + did the formatting.

Pls check :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't look formatted to me :)

Please run the code in Workbench, that will format it.
Then copy the result to code.rs.

See here:
#554 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, I ran the code and copy-pasted it as you asked. Let me know if its correctly formatted now

Copy link
Contributor

Choose a reason for hiding this comment

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

The code looks good now.

you don’t have to remove your name, you should resolve the conflict in a way that all of the additions are there. You can give it a try by clicking on “Resolve conflicts” on this page

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 tried that, but I cant figure it out. Could you please help out?

Copy link
Contributor

Choose a reason for hiding this comment

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

I've done it for you.
You can see how in this screencast, so you can try next time on your own :)
screencast

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I will look at the screencast. Much appreciated

@mbilal234 mbilal234 requested a review from sonnyp as a code owner August 30, 2023 04:49
@Hofer-Julian
Copy link
Contributor

After your approval @sonnyp, we can merge this

@sonnyp sonnyp merged commit a07bb31 into workbenchdev:main Aug 30, 2023
1 check passed
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.

3 participants