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

Improve sig snippet to display alias statement #10212

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

sae220
Copy link
Contributor

@sae220 sae220 commented Sep 30, 2024

Before @ganicke 's PR (#10078), alias statements have same reference (or help doc) as original statements have.

old_remove_at

Thanks to his PR, _removeAtStatement (alias for removeAt) has an original page, but it is not altogether good, I guess.
For blocks users, removeAt and _removeAtStatement looks different statements, but they are essentially the same.
And of course, JavaScript/Python users shouldn't use _removeAtStatement.

old_remove_at_statement

So, I suggest to improve sig snippet to display alias statement.
new_remove_at

And anyway _popStatement, _shiftStatement and _unshiftStatement (as _removeAtStatement) should have thier reference.

@ganicke @abchatra

riknoll
riknoll previously requested changes Oct 1, 2024
Copy link
Member

@riknoll riknoll left a comment

Choose a reason for hiding this comment

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

code looks good! however, please leave the remove-at-statement.md file.

our docs are served "live-ish" from this repo and so changing this now will break existing targets that don't have your change to the help annotation in pxt-core.d.ts. this file can be removed once this change has been propagated to other editors.

Copy link
Collaborator

@ganicke ganicke left a comment

Choose a reason for hiding this comment

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

The problem I have with combining these is that pop() returns a value and _popStatement() does not. This will either need to be noted in the common reference page or the seperate reference pages will need to remain.

@abchatra
Copy link
Collaborator

@ganicke is this good to merge?

Copy link
Collaborator

@ganicke ganicke left a comment

Choose a reason for hiding this comment

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

I've added my edits for the additional 'statement only' info.

@ganicke ganicke dismissed riknoll’s stale review October 16, 2024 00:38

removal of '_remove-at-statement.md' is reverted

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.

4 participants