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

Always show the asset path in the workbench #998

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

mensinda
Copy link
Contributor

This moves the resource button next to the locale. Additionally, the resource path of a text is now always shown and not hidden behind a tooltip:

tmp

@aurambaj
Copy link
Collaborator

@mensinda I like the concept in fact I always wanted to have the asset somehow directly shown.

One problem though is that it is pretty common for it to be somewhat long which

  1. will make the UI cluttered with repetition
  2. overflow badly...

for the overflow maybe we can restrict it to max size, truncating the start and just show the end of the path. Then when hovering on the text, we'd see the whole path.

for the cluttered part, I've been thinking to have a selector to choose different "view mode" next to the pagination. It would show more or less information based on the mode.

One other info pretty useful to have is the "repository name" when doing cross repository searches.

So we could have a condensed view, which the current display and and expanded view which would show the repository name and repository path. To avoid having to deal with length of the path, I think it would make sense to just have the path on its own line.

Any thoughts on that? Wondering if you have other information besides the path that you feel should be directly accessible.

@mensinda
Copy link
Contributor Author

mensinda commented Feb 27, 2024

for the overflow maybe we can restrict it to max size, truncating the start and just show the end of the path

Implemented by setting the max width to 256px and overflow: hidden.

for the cluttered part, I've been thinking to have a selector to choose different "view mode" next to the pagination

Implemented.

One other info pretty useful to have is the "repository name" when doing cross repository searches.

I have also added this.

Any thoughts on that? Wondering if you have other information besides the path that you feel should be directly accessible.

Not that I can currently think of.


tmp

@aurambaj
Copy link
Collaborator

aurambaj commented Feb 28, 2024

Thanks @mensinda !

edit: Merging the PR as it

  1. Can we replace the cookie with local storage?
  2. Can we keep the current view and call it "Standard". It could replace "Reduced", but that one has the "asset" now.
  3. Update the dropdown title with the selected mode
  4. About the use of color, ideally I'd avoid adding to many also it is not super obvious what the color conveys in that case. I'm thinking that may in that expended view it could be more explicit

Potentially, on its own line before the locale/string id, Have 2 labels prefixed with "repo" eg. "repo: demo" and other "asset: demo.properties". I think "grey" would be fine for those


return (
<OverlayTrigger placement="top" overlay={assetPathTooltip}>
<Label style={{maxWidth: "256px", overflow: "hidden"}} bsStyle='info' bsSize='large' className="clickable" onClick={this.onAssetPathClick}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment on the style/color and the prefix/be on its own line.

@aurambaj aurambaj merged commit 2c80f5a into box:master Mar 1, 2024
2 checks passed
@mensinda mensinda deleted the show_resource branch March 1, 2024 18:36
ja-openai pushed a commit to ja-openai/mojito that referenced this pull request Jun 27, 2024
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