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 managed project to import wizard project view field #5227

Merged
merged 4 commits into from
Sep 1, 2023

Conversation

brian-mcnamara
Copy link
Contributor

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Description of this change

This change adds either a default or adds to the history the projects .managed.bazelproject file if it exists. This helps users who are importing the project though the wizard to find this file

@brian-mcnamara brian-mcnamara marked this pull request as ready for review August 10, 2023 16:37
@github-actions github-actions bot added product: Android Studio Android Studio plugin product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Aug 10, 2023
@brian-mcnamara brian-mcnamara marked this pull request as draft August 14, 2023 16:25
@mai93 mai93 assigned tpasternak and blorente and unassigned mai93 Aug 14, 2023
@brian-mcnamara brian-mcnamara marked this pull request as ready for review August 14, 2023 17:24
@brian-mcnamara
Copy link
Contributor Author

Switched over to adding new radio buttons in the wizard. I'm not 100% on the descriptions, so let me know if they should be updated
Screenshot 2023-08-14 at 10 25 53 AM

@blorente
Copy link
Collaborator

In general, I'd love to make the "choose the project view file" better. However, I have a couple of high-level thoughts:

  • In our users' experience, if someone is using the managed project view, they have probably auto-imported the project, and therefore the .ijwb directory is already created for them. We don't usually check in the managed project view, because we only check it if we change something, and then we want to put it in a non-automatic place.
  • I'm not sure users will understand the difference between "managed" and "env variable" and all the other options. Most users just click through this part. Could it be possible, instead, to just traverse the repository looking for project view files, have a single toggle offering those to the user? That way the user doesn't have to care about where the project view comes from.

@brian-mcnamara
Copy link
Contributor Author

Thanks @blorente
Interesting to know, we are currently checking in a base .managed.projectview file to provide some documentation and examples as our users are new to bazel and this provides a path forward to quickly onboard. While we do mainly rely on the auto-import behavior, there is a subset of users (due to our migration strategy for our existing build system to bazel) that have auto-import disabled to prevent switch over during the migration. Because of that, the path forward for them is to use the import wizard.

As for understanding the differences, thats a fair point, and I do agree updates to clearly this and the other options makes sense. I could add the path to the file as part of the option, but let me think about other options too.

@tpasternak
Copy link
Collaborator

Yeah, imo it would be nice to move the new radio buttons to the bottom, and add textboxes presenting the paths (like under "Import project view file" radio button, but read-only) What do you think about it @blorente ?

@blorente
Copy link
Collaborator

@tpasternak I agree with your points, moving the radio buttons to the bottom and explaining which file it is is probably sufficient.

@brian-mcnamara
Copy link
Contributor Author

Updated UI

Screenshot 2023-08-31 at 11 38 10 AM

@tpasternak
Copy link
Collaborator

Thank you @brian-mcnamara !

@tpasternak tpasternak merged commit fa47f78 into bazelbuild:master Sep 1, 2023
6 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Sep 1, 2023
copybara-service bot pushed a commit to bazelbuild/bazel that referenced this pull request May 16, 2024
It could make the initial import a bit more convenient

Following the change implemented in bazelbuild/intellij#5227 (comment), the IntelliJ plugin recognizes the "default" project view file.

Closes #21969.

PiperOrigin-RevId: 634394317
Change-Id: If4e4372e6489597c65c8127bfa0c508854674380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: Android Studio Android Studio plugin product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

4 participants