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

Editor: Improve Signal Dock for script classes #80411

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

dalexeev
Copy link
Member

@dalexeev dalexeev commented Aug 8, 2023

  • Add signal documentation for script classes.
  • Use separate sections for script class inheritance.

Before

After

* Add signal documentation for script classes.
* Use separate sections for script class inheritance.
@dalexeev dalexeev force-pushed the editor-improve-signal-dock branch from 206be5d to 1d5539c Compare August 16, 2023 10:05
@dalexeev dalexeev marked this pull request as ready for review August 16, 2023 10:07
}
descr_cache[base][signal_name] = descr;
descr_cache[doc_class_name][signal_name] = descr;
Copy link
Member Author

Choose a reason for hiding this comment

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

The cache is not invalidated until the editor is restarted. This is good for native classes, but bad for scripts. Perhaps we should not cache script signal descriptions?

We could also move the loop outside to prevent unnecessary iterations (actually, this is not so important since a class usually has few signals).

Copy link
Member

Choose a reason for hiding this comment

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

I guess not caching script signal descriptions might be fine, provided that it's not too costly to recompute each time.

Otherwise they could be cached separately, and the script cache entry marked dirty whenever the script changes.

Copy link
Member

@akien-mga akien-mga 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 to me.

@akien-mga akien-mga merged commit 417239e into godotengine:master Aug 17, 2023
@akien-mga
Copy link
Member

Thanks!

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.

Custom signal descriptions are not displayed in Node > Signals tab
3 participants