-
Notifications
You must be signed in to change notification settings - Fork 23
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
Enterprise repo picker follow up polish #1322
Comments
Added |
waiting on review |
Changes to the enterprise enhanced context panel: - Pluralizes repo/repos in the repo tree view summary line - Updates counts in the repo tree view summary line - Mentions the number of ignored repos in the repo tree view summary line (if any) - Adds a help tooltip with a link to documentation - Removes the help button from the right-hand side toolbar - Clicking outside the repo picker popup accepts the edits instead of cancelling them - Alt-tabbing while the repo picker popup is open does not dismiss it Part of #1322 ## Test plan Tested manually. 1. Run with `CODY_JETBRAINS_FEATURES=cody.feature.internals-menu=true` 2. Sign into an Enterprise account 3. Verify the repo picker is collapsed, one line and the edit pencil is visible 4. Hover the repo picker and verify the tooltip, opening the link goes to context documentation ![Screenshot 2024-05-10 at 20 23 52](https://github.com/sourcegraph/jetbrains/assets/55120/e3f30e14-a740-445d-bdeb-510cd98e98a8) 5. Add repos and verify the summary line language updates, pluralization is correct, etc. 6. Use Internals, Testing: Cody Ignore and ignore some repositories, check the "ignored" language updates, etc. ![Screenshot 2024-05-10 at 20 25 19](https://github.com/sourcegraph/jetbrains/assets/55120/023d38f7-6f41-4563-87ba-1d7093c796bd) 7. Verify the details of adding repositories with the pencil: - Change text, press ESC, repo list should *not* update - Change text, press cmd-enter, repo list should update - Change text, click outside popup, repo list *should* update (new behavior) 8. Open the pencil popup, verify that cmd-tab/alt-tab away from IntelliJ and back does not close the popup
I've jumped in here and done a review at the request of @dominiccooney so he can get started on the problems that were raised in the call last night, as he needed to get started on the eng side. Apologies for the dump here, just wanting to get them out quickly…
Currently: Instead here is an updated design that shows a few tweaks things labels, unnecessary nestings, unnecessary server name etc, as well as the invalid repo: https://www.figma.com/design/m9Yvgv6W3aPRLfXnxgwnEz/JetBrains?node-id=1540-6065&t=tnA1l77M1NjRHLQh-4
CleanShot.2024-05-17.at.12.34.44.mp4
Longer-term I think it's probably worth asking: is this the right type of UI here, or should we investigate a probably-more-easy-to-use dialog for doing this… something more like: Be curious to see how people feel about the current UI, and @danielmarquespt we could work on a different version of it. |
thank you @toolmantim for jumping in on this. I agree with the things you suggested, but I'll be conducting a review myself and share (other?) things that I might find, as well as the priority for them |
List of improvements by priority UPDATED 21/05(contains reviewed suggestions from @toolmantim and more)
Needed icons: 1st line enables or disables all of the checkboxes below them
string: Chat Context Settings
Removing an item from the text box, removes it from the tree. Used to be always true, but I'm seeing weird states there tree nodes still pressist after being removed from the text box
Invalid repos display the full string on the tree (since can be some gibberish or invalid urls, we can’t format it properly, so we can display that string with a ? icon)
like
If the list is edited (e.g. the list is reordered, a new one is added), we retain the unchecked state of any repos in the treeview (I.e. it doesn’t just reset them all to be checked).
CleanShot.2024-05-17.at.12.34.44.mp4(UI details and fixes coming in a different issue. Functionality first) |
@danielmarquespt "Local project" is a problematic label, because although the repo is detected from the local project, the code is all coming from the remote repo… no local git changes are included (which is a problem/surprise for a lot of users currently… this could make it worse). I think "Project repository" is probably a less problematic label. Given the above… and that all the repos are from the instance… I think we can do without the Enterprise instance URL in the treeview. Maybe in the edit window is the right place to explain they can only add repos that exist on their instance? Given all that… I think we can remove the extra level of tree nesting (Figma): I'd suggest something like this for initial state: (last item opens edit view when clicked) If > 1 extra repo: (last item opens edit view when clicked) Collapsed view showing a count and some state, so when it's collapsed you can still tell what the scope of the chat is: |
Ok I just tested because I was though that the source of the local project was the local files. I tested with a local project that is not part of the sourcegraph instance and Cody kinda works, and is able to fecth files but its way more limited. Given that I think it makes sense to put the local project under the instance node, and we can simplify the tree. I'll update this Regarding having the action at the bottom of the tree, I like it, but as far as I understand we cannot include actions as part of tree nodes. Maybe we can listen for a click there and trigger the edit box, but I'm not sure of much of an hack that would be |
If it's anything like VS Code it'll have a click handler you can trigger anything off. |
There's multiple lists here with some conflicting details (Repos? Repositories? ... Say the remote name? Don't say the remote name?) and some of the list items are duplicates (for example #1354 tracks supporting https clone URLs.) I am making a clean up pass in dpc/issue-1322 with these changes (so far):
TODO:
|
@dominiccooney so @danielmarquespt and I just caught up, and Figma now has the latest changes with some simplifications. |
Updated the task list #1322 (comment) |
@danielmarquespt , bit of feedback based on the design I had been implementing: the "active" language looks weird to me when enhanced context is unchecked. The repositories aren't "active" in any sense then: @toolmantim , when you say "the" Figma is that the link in this comment and this comment ... that still has some $placeholders. |
I did a search in the Figma for those strings, and found https://www.figma.com/design/m9Yvgv6W3aPRLfXnxgwnEz/JetBrains?node-id=1562-1092&m=dev which I think might be the current version of @danielmarquespt’s designs |
Thanks @toolmantim , noted... next time I will search for the strings. Did not think of that! |
Thats a good point. I think we can remove the active and go with just "☑️ Enhanced Context 3 repos" |
Fixes #1322, fixes #1425, fixes #1544, fixes #1532, fixes #1542 To summarize the changes: - There are some repo resolution caches to make checking and unchecking faster. - The summary line has been simplified from counting total, ignored, etc. repos to a simple count of repos which will be used (that is, the enabled and not ignored repos, including the automatically included repo if it is not ignored.) - The automatically included repository is represented in the tree view with a "Project repository" label. - There's a separator between the tree view and the rest of the chat panel. There's an expansive tooltip when you hover the separator, but not the tree view so the tooltip does not impede expanding and collapsing the tree view. - The right hand side toolbar is gone, instead, you click on a tree view item to bring up the repo list editor. You can also highlight it with the keyboard and hit "enter". - If you try to enable more than 10 repositories, you get feedback in the form of an error notification. - You can select and deselect repositories and they stay in the repository tree view and are saved in chat state. - The tree view reflects what you wrote in the popup. "Not found" repositories are present with a label. You can delete a repository from the text box to remove it from the tree view. - The contrast and consistency of icons have been improved. - The popup is positioned above the repository list, and is larger. - The intermediate "Repositories" node of the tree view has been removed. Known bugs/caveats: - When selecting/deselecting repositories in the tree view with the keyboard, the item loses focus as the view is reconstructed. - You can add an eleventh repository by specifying 10 repositories that are not the automatically included repository. This one goes up to 11. - Loading a chat with a de-selecting repository that has since been filtered and checking it will result in the "ignored" state appearing. This is because Cody Ignore is applied at late stage of remote repo handling. - Some of the new icons proposed in the design are not incorporated. There are many overlapping versions of the design for this component... I have to draw a line under this and handle any other feedback as follow-ups. - This does not address the https feedback in issue #1322; https URLs are filed in #1354 and will be looked at separately. - Repositories where the entered spec and the resolved name are different may present as duplicates with one "not found." ## Test plan Tested locally ![Screenshot 2024-05-28 at 19 19 09](https://github.com/sourcegraph/jetbrains/assets/55120/1640c6ca-5672-45dc-9f9e-617dfba1966d)
These are follow up issues from #982 and code review feedback on #1308
Tasks
Tooltip text:
Tree view language:
The text was updated successfully, but these errors were encountered: