Makecode: Function rename
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
I can rename function in Makecode. When I do so, I do not see new function in the list of "calls" for function, I see old name. It is a bug in the Makecode editor.
DEMO:
- Create block for custom function
test1. Create block for custom functiontest2. - Check the list of available functions in Advanced/Functions, you should see
test1andtest2. - Rename function 'test2' to something else, maybe
test3. - Check the list of available functions in Advanced/Functions, you should see
test1andtest3but you will seetest1andtest2. The BUG
To call function test3 I have to click on function definition and select Create "call test3"
When I use test2 block from the list, it really calls test2 but such definition is not on the desk...
It seems that once projecty is reopned, list of functions are updated, so you cannot see the issue in the example above. When I saved project there were functions test1 and test2 but when I open shared project, I see functions test1 and test3, that is expected... Anyway, you can rename function test3 to test4 and you will see the issue again... ;-)
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 rename flow in the linked Makecode editor or DEMO: create test1 and test2, rename test2, and inspect Advanced/Functions. Done means the available function list immediately shows the new name and no longer offers the old call block, without reopening the project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100