Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Remove action sidebar and bring migrated extension icons to the top nav#46339

Merged
philipp-spiess merged 10 commits into
mainfrom
ps/remove-actions-bar
Jan 13, 2023
Merged

Remove action sidebar and bring migrated extension icons to the top nav#46339
philipp-spiess merged 10 commits into
mainfrom
ps/remove-actions-bar

Conversation

@philipp-spiess

@philipp-spiess philipp-spiess commented Jan 11, 2023

Copy link
Copy Markdown
Contributor

This PR removes the action sidebar that was previously used for extensions to significantly reduce the UI clutter on the blob view.

Note: Because we still support enableLegacyExtensions, I didn't delete code for the sidebar yet. However all of the code is lazy loaded so it should not impact bundle size. We should do the deletion in a separate PR so it's save to revert.

Test plan

test.plan.mov

Testing with enableLegacyExtensions on

legacy.extensions.on.mov

App preview:

Check out the client app preview documentation to learn more.

@philipp-spiess philipp-spiess requested review from a team and vdavid January 11, 2023 16:59
@philipp-spiess philipp-spiess self-assigned this Jan 11, 2023
@cla-bot cla-bot Bot added the cla-signed label Jan 11, 2023
@github-actions github-actions Bot added the team/code-exploration Issues owned by the Code Exploration team label Jan 11, 2023
@sg-e2e-regression-test-bob

sg-e2e-regression-test-bob commented Jan 11, 2023

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
0.04% (+1.04 kb) -0.01% (-1.54 kb) -0.02% (-2.58 kb) 0.42% (+3) 🔺

Look at the Statoscope report for a full comparison between the commits 61342ec and bc67068 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@philipp-spiess

Copy link
Copy Markdown
Contributor Author

I'll try to see if I can find fitting icons that are monochrome and have less details for the top bar so that the UI is more consistent. We have a bunch of different editor icons though so I’m a bit worried about that 😅

@vdavid vdavid left a comment

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.

LGTM, left a typo fix

Comment thread client/web/src/open-in-editor/OpenInEditorActionItem.tsx Outdated
@vdavid

vdavid commented Jan 12, 2023

Copy link
Copy Markdown
Contributor

I'll try to see if I can find fitting icons that are monochrome and have less details for the top bar so that the UI is more consistent. We have a bunch of different editor icons though so I’m a bit worried about that 😅

That'd be a nice touch, but I'd leave it for a designer, as it's 95% design work and 5% replacing the files and creating a PR. Also, it seems low prio, and I wouldn't bother for now.

@philipp-spiess

philipp-spiess commented Jan 12, 2023

Copy link
Copy Markdown
Contributor Author

That'd be a nice touch, but I'd leave it for a designer, as it's 95% design work and 5% replacing the files and creating a PR. Also, it seems low prio, and I wouldn't bother for now.

Hm maybe, but:

  1. The current way of loading these images via the <img> tag should probably changed as well since it causes the images to be loaded last on the page which creates a noticeable lag
Screen.Recording.2023-01-12.at.10.54.59.mov
  1. We don't really have enough design resources to help with this at the moment :/

On the other hand though, I can't find monochrome icons for these editors anyway 😅

@philipp-spiess

Copy link
Copy Markdown
Contributor Author

I've changed the icon to "set up your IDE" only for now since this had the most color variance and is also visible to anyone that has not configured anything. It'll now load faster (since it's bundled in the JS) and look more coherent.

Before

Screenshot 2023-01-12 at 11 00 26

After

Screenshot 2023-01-12 at 11 03 34


Open question

Screenshot 2023-01-12 at 11 10 16

I’m unsure what to do about the IDE icons. There are quite a few we support (see complete list) plus especially the JetBrains icons have no low-resolution version: https://www.jetbrains.com/company/brand/#logos-and-icons. The MDI icon set only really has an icon for VS Code (which we could use but then there's inconsistencies if you have another IDE configured at the same time.

I think we should probably not change the editor icons just yet and fix this up later.

cc @sourcegraph/design @sourcegraph/code-exploration

@philipp-spiess philipp-spiess changed the title Remove action sidebar Remove action sidebar and bring migrated extension icons to the top nav Jan 12, 2023
@philipp-spiess philipp-spiess requested a review from a team January 12, 2023 10:17
@danielmarquespt

Copy link
Copy Markdown
Contributor

Regarding the IDE icons: I don't think there is much we can do, so I would use the coloured version for now. Even if they don't downscale well, they are still recognisable, even if not pixel perfect. I think that is better than having a monochrome version that the user doesn't identify.

Comment thread client/web/src/open-in-editor/OpenInEditorActionItem.tsx Outdated

@taras-yemets taras-yemets left a comment

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.

Nice improvement!

@github-actions

Copy link
Copy Markdown
Contributor

Problem: the label i-acknowledge-this-goes-into-the-release is absent.
👉 What to do: we're in the next Sourcegraph release code freeze period. If you are 100% sure your changes should get released or provide no risk to the release, add the label your PR with i-acknowledge-this-goes-into-the-release.

@philipp-spiess philipp-spiess merged commit ec8ca65 into main Jan 13, 2023
@philipp-spiess philipp-spiess deleted the ps/remove-actions-bar branch January 13, 2023 16:20
@felixfbecker

Copy link
Copy Markdown
Contributor

I'd suggest that we change the current "open in editor" icon (when no editor is set). The current icon shows code, which doesn't really explain that it's to open it in your editor. Sourcegraph and GitHub all equally show code.

I'd suggest application-edit-outline from MDI, which shows a desktop application with a pencil to indicate that it's an editor.

CleanShot 2023-01-18 at 09 53 14@2x

I think there is an argument for keeping the actual editor icons as they are, given they are brand logos (although it's a bit inconsistent that they are in color).

But I think we also should change the Blame icon, because currently it only signifies git, which could mean a number of things that are not blame (also, what does that mean on a Perforce repo?). It also indicates the active/disabled state only through color, which is a) not WCAG compliant and b) inconsistent with other buttons like raw Markdown mode or line break. Maybe one of these could work because they signify that it's about the authors that have touched the file:

CleanShot 2023-01-18 at 09 57 36@2x

CleanShot 2023-01-18 at 09 56 59@2x

CleanShot 2023-01-18 at 09 59 46@2x

(account-details, account-group, account-edit)

@philipp-spiess

philipp-spiess commented Jan 18, 2023

Copy link
Copy Markdown
Contributor Author

Yeah agree regarding the open-in-editor setup icon.

For git blame I think this one would work well. I agree regarding the color not be enough so I took a look at what git lense is doing in vscode and they have one icon that has an outlined and a filled style. Turns out that the icon that I liked best from your suggestions (account-details since it also shows lines) also has two variants in MDI, so I'd propose we go with these? (Will push a PR tomorrow morning)

Screenshot 2023-01-18 at 19 05 44

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants