Skip to content

Custom context menu example - #1463

Merged
domesticmouse merged 22 commits into
flutter:mainfrom
justinmc:context-menu
Nov 9, 2022
Merged

domesticmouse merged 22 commits into
flutter:mainfrom
justinmc:context-menu

Conversation

@justinmc

@justinmc justinmc commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

This a sample meant to demonstrate custom context menus and the various ways they can be used. This means the unified ability to customize the text selection toolbar in text fields and on selectable text and the right-click/long-press menu anywhere else in the app.

Screenshot from 2022-10-06 16-44-23 Screenshot from 2022-10-06 16-39-30

Must wait for flutter/flutter#107193.

@justinmc justinmc self-assigned this Oct 6, 2022
@domesticmouse

Copy link
Copy Markdown
Contributor

Hey @justinmc, I'm curious what versions of Flutter this sample should compile and run with. I'm happy with master only or master + beta in experimental, but I'd like an idea of when it is intended to migrate to top level with stable availability of the used APIs.

Secondly, this sample should be added to the CI pipelines. I'm happy to either point you in the right direction, or submit a PR to your repo for the required changes...

@justinmc

justinmc commented Oct 7, 2022

Copy link
Copy Markdown
Contributor Author

I've made this PR a draft for now because it requires flutter/flutter#107193 to work, which hasn't been merged yet. Once it's merged I'll make sure this works on master and open it for review. Should I document this anywhere in the PR?

About CI, I'm happy to do the work to add it if you point me in the right direction. Thank you for commenting and helping me with this!

@domesticmouse

Copy link
Copy Markdown
Contributor

@justinmc
justinmc marked this pull request as ready for review November 4, 2022 17:24
@justinmc

justinmc commented Nov 4, 2022

Copy link
Copy Markdown
Contributor Author

@domesticmouse This PR is now ready for review. The PR that it depended on in flutter/flutter has been merged, so it works on Flutter's master channel.

Are the CI failures anything that I should worry about?

"code_sharing/server"
"desktop_photo_search/fluent_ui"
"desktop_photo_search/material"
"experimental/context_menus"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When are we expecting this to be usable from beta channel? I'd like to add it as a commented out entry to the beta and stable CI scripts with TODO comments as to when it should be enabled.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will do. It was merged 10 days ago (flutter/flutter@0b451b6). I think it will make it into the next beta release?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sgtm!

@domesticmouse

Copy link
Copy Markdown
Contributor

From the CI runs, it looks like you stripped the +x permission from the master CI script. We need the CI passing before I can land this PR.

@justinmc

justinmc commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

Maybe my editor automatically stripped that +x permission somehow? To fix it I just tried running this:

$ git update-index --chmod=+x tool/flutter_ci_script_master.sh   

And committed and pushed it. Hopefully that fixes it.

@justinmc

justinmc commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

Looks like there are still failures. What were you seeing that made you think it was a file permissions problem, is that still showing up in the test output? I can't tell what's wrong but I'm not familiar with this repo.

Comment thread tool/flutter_ci_script_beta.sh Outdated
"code_sharing/shared"
"desktop_photo_search/fluent_ui"
"desktop_photo_search/material"
// TODO(justinmc): To be enabled when its PR hits the master channel.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

// is not a comment in a bash script. Please change to #

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Big fail, thanks.

@domesticmouse

Copy link
Copy Markdown
Contributor

Also, looking at https://github.com/flutter/samples/actions/runs/3412894076/jobs/5678974213#step:5:1 it looks like there are files in need of dart format

@justinmc

justinmc commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

Current failure: I never even thought to add tests to this, so the default "flutter create" test is still there and failing. I'll add some real tests and deleted that one.

@justinmc

justinmc commented Nov 9, 2022

Copy link
Copy Markdown
Contributor Author

@domesticmouse I think this is ready to go! I realized I had never updated the default test, whoops. I added a bunch of real ones now.

@domesticmouse
domesticmouse merged commit 41571ea into flutter:main Nov 9, 2022
@justinmc
justinmc deleted the context-menu branch November 10, 2022 05:13
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