scratchfoundation / scratchfoundation/scratch-blocks
Auto-scrolling flyout doesn't update "selected" category in category list
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
Expected Behavior
Auto-scrolling the flyout should make the "selected" category be updated in the category list.
Actual Behavior
The category list won't be updated until you manually scroll by some other means (mouse wheel, scrollbar, drag).
This is a somewhat similar issue to #1070.
Steps to Reproduce
Auto-scroll the flyout so that it becomes in a position where it would be considered to be in a different category/section than it was before the autoscroll. To actually do that in Scratch:
- Scroll so that the "Variables" section is highlighted grey.
- Click the "Make a Block" button, then confirm the new block.
- Note the category scrolls down to the "My Blocks" section, but the category list still says you're in the "Variables" section.
- Update the category list by scrolling manually (downwards, so that you don't position it back in the Variables section). Note that the category list now reflects you being in the "My Blocks" section.
Once you've created a custom block, this has a more noticeable effect if you edit a custom block:
- Make sure you've got a custom block created (i.e. so you can see the "define" block for it).
- Manually scroll to some category close to the start of the list, e.g. "Looks".
- Right-click the custom block definition and edit it, then confirm the dialog.
- Note that you are auto-scrolled to the "My Blocks" section, but the category list thinks you're still in "Looks" (or some other category). (This'll be changed in #1856, but it's a good way to repro the issue here for now.)
- Scroll manually. The category list will update and show you're scrolled to the category you're actually scrolled to (My Blocks or Variables).
Operating System and Browser
Linux (Debian), Firefox 66.0b6.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the auto-scroll scenario in the flyout, especially after creating or editing a custom block, and trace how the category list is updated during manual scrolling. Compare the behavior with the related issues #1070 and #1856. Done means auto-scrolling changes the selected category to match the visible section without requiring manual scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100