scratchfoundation / scratchfoundation/scratch-blocks

Auto-scrolling flyout doesn't update "selected" category in category list

Open
#1,900 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

firefox help wanted
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:

  1. Scroll so that the "Variables" section is highlighted grey.
  2. Click the "Make a Block" button, then confirm the new block.
  3. Note the category scrolls down to the "My Blocks" section, but the category list still says you're in the "Variables" section.
  4. 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:

  1. Make sure you've got a custom block created (i.e. so you can see the "define" block for it).
  2. Manually scroll to some category close to the start of the list, e.g. "Looks".
  3. Right-click the custom block definition and edit it, then confirm the dialog.
  4. 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.)
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.