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

Minimap slider does not full width every time #134489

Closed
ansidev opened this issue Oct 6, 2021 · 10 comments · Fixed by #135081
Closed

Minimap slider does not full width every time #134489

ansidev opened this issue Oct 6, 2021 · 10 comments · Fixed by #135081
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@ansidev
Copy link

ansidev commented Oct 6, 2021

Does this issue occur when all extensions are disabled?: Yes/No

  • Version: 1.60.2
  • Commit: 7f6ab54
  • Date: 2021-09-22T11:59:27.195Z (1 wk ago)
  • Electron: 13.1.8
  • Chrome: 91.0.4472.164
  • Node.js: 14.16.0
  • V8: 9.1.269.39-electron.0
  • OS: Darwin x64 20.6.0

Steps to Reproduce:

  1. Open a large file with a long line to be scrollable over the file (x and y axis).
  2. Scroll right.
  3. Hover on minimap.

Actual: The minimap slider does not have full width.
Expected: The minimap slider is always full width.

@alexdima
Copy link
Member

alexdima commented Oct 7, 2021

@ansidev Could you please also add a screenshot, I am not sure what you are referring to.

@alexdima alexdima added the info-needed Issue requires more information from poster label Oct 7, 2021
@ansidev
Copy link
Author

ansidev commented Oct 7, 2021

@alexdima Please check.

VSCode_minimap_bug.mov

@ansidev ansidev changed the title Minimap does not full width every time Minimap slider does not full width every time Oct 7, 2021
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues and removed info-needed Issue requires more information from poster labels Oct 7, 2021
@alexdima alexdima added this to the October 2021 milestone Oct 7, 2021
@AiverReaver
Copy link
Contributor

@alexdima can I work on this issue. if yes code pointers to investigate.

@alexdima
Copy link
Member

alexdima commented Oct 11, 2021

PR welcome. code pointer

@AiverReaver
Copy link
Contributor

thanks

@AiverReaver
Copy link
Contributor

@alexdima what would be the expected behaviour of the minimap for a horizontal scroll?

@alexdima
Copy link
Member

alexdima commented Oct 14, 2021

@AiverReaver I think we could just remove that the slider moves horizontally and let it stay put.

@ansidev
Copy link
Author

ansidev commented Oct 14, 2021

this._sliderHorizontal.setLeft(horizontalSliderLeft); // set offset left for minimap slider
this._sliderHorizontal.setWidth(this._model.options.minimapWidth - horizontalSliderLeft); // update minimap slider width

I think it should be:

this._sliderHorizontal.setLeft(0);
this._sliderHorizontal.setWidth(this._model.options.minimapWidth);

@ansidev
Copy link
Author

ansidev commented Oct 14, 2021

this._sliderHorizontal.setLeft(horizontalSliderLeft); // set offset left for minimap slider
this._sliderHorizontal.setWidth(this._model.options.minimapWidth - horizontalSliderLeft); // update minimap slider width

These lines of code should work if you support scrolling horizontally for the minimap slider. At this time, we can only scroll the minimap slider vertically.

@AiverReaver
Copy link
Contributor

@AiverReaver I think we could just remove that the slider moves horizontally and let it stay put.

Okay, I can do that but I think it would be much better if we allow horizontal scroll in minimap. what do you think about that?

@rzhao271 rzhao271 added the verified Verification succeeded label Oct 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@alexdima @ansidev @rzhao271 @AiverReaver and others