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

Added advanced mode #337

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Added advanced mode #337

merged 1 commit into from
Dec 17, 2024

Conversation

urbit-pilled
Copy link
Contributor

@urbit-pilled urbit-pilled commented Dec 16, 2024

/claim #282

  • adds a checkbox to the main_panel title bar
  • adds is_advanced boolean to the block_definition (default value is false)
  • hides advanced blocks when the checkbox is not ticked.

Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

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

This is working! Except for a bug I've found and a check failing. I tried it with the "every physics step" block from PR #262 and then marking the "is advanced" option on it.
Grabación de pantalla desde 2024-12-16 09-44-58.webm

Please fix the bug above and also make the "linting and formatting" check pass. You can run the checks locally if you setup pre-commit as the README explains.

addons/block_code/ui/main_panel.gd Outdated Show resolved Hide resolved
Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

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

See the comment above. A bug and a failing check needs attention. Other than that it's working!

@urbit-pilled
Copy link
Contributor Author

urbit-pilled commented Dec 16, 2024

Thanks for the review @manuq, I setup pre-commit which fixed the linter errors and I also fixed the bug where adding a new Variable removes the advanced blocks.

@urbit-pilled urbit-pilled requested a review from manuq December 16, 2024 20:16
Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

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

Looks good now, @urbit-pilled . We try to have descriptive commit messages in this project. Could you squash your commits and provide a good description? For example:

  • A first line explaining briefly what's this about.
  • A description of what does this PR do and how it's implemented.
  • As last line, the URL to the issue that this fixes, eg "Fixes https://..."

Then we'll be able to merge.

This adds an advanced mode to the title dock that allows the user to see advanced blocks,
which will help us add advanced blocks without cluttering the block list.

I implemented it by:
- adding `is_advanced` boolean to the `BlockDefinition` class and set the default value to false.
- adding an "advanced" checkbox to `main_panel.tscn`
- modifying `picker.gd` to filter the block list to hide advanced blocks if the checkbox is unchecked.

Fixes endlessm#282
@urbit-pilled
Copy link
Contributor Author

Thanks for the help @manuq, I squashed the commits and provided a more detailed commit message so it should be ready to merge now.

@urbit-pilled urbit-pilled requested a review from manuq December 16, 2024 23:53
@manuq
Copy link
Contributor

manuq commented Dec 17, 2024

Thanks for the help @manuq, I squashed the commits and provided a more detailed commit message so it should be ready to merge now.

Thanks for your contribution! The commit message is very good now.

@manuq manuq merged commit 0d0112e into endlessm:main Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants