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

feat: Jaspr Dart Analyzer Plugin #132

Closed
fusion44 opened this issue Nov 1, 2023 · 6 comments · Fixed by #133
Closed

feat: Jaspr Dart Analyzer Plugin #132

fusion44 opened this issue Nov 1, 2023 · 6 comments · Fixed by #133
Labels

Comments

@fusion44
Copy link
Contributor

fusion44 commented Nov 1, 2023

I want to be able to wrap components via my IDE similar to what the Flutter tooling has to offer. This issue exists to track my progress implementing this and maybe avoid duplicating work on this.

Features:
[x] Remove components from the tree*
[x] Wrap components with another component
[ ] ...

* right now the code generator removes commas where there have been some. Need to find a fix for this.

I'm using the Dart Custom Lint plugin.

Preview:
https://github.com/schultek/jaspr/assets/503952/d8fd12d3-9196-4fa2-89ae-0e408831d480

@schultek
Copy link
Owner

schultek commented Nov 6, 2023

Very cool idea, I'd love to see this coming together. Let me know if I can assist in any way.

@fusion44
Copy link
Contributor Author

fusion44 commented Nov 7, 2023

If you have ideas for lints or assists you can post them here and I try to implement them. Although, this might take a bit of time to do all of this.

@schultek
Copy link
Owner

schultek commented Sep 3, 2024

Lets collect some lints / code assists that should be included in the first version:

Assists:

  • Wrap with [...]
  • Remove component
  • Create new StatelessComponent / StatefulComponent / InheritedComponent
  • Make Stateless into Stateful Component
  • Create styles for selected html component (add css class name + create styles for class name)

Lints:

  • use_key_in_component_constructors (same as flutter)
  • no_logic_in_create_state (same as flutter)
  • sort_children_list_last (for html components)
  • avoid_inline_styles (for const or static styles)
  • ...

I welcome everyone to propose others that you feel are important to have.

@dinko7
Copy link

dinko7 commented Sep 3, 2024

Things I'd like to have in addition to this:

  • wrap with div (probably the most used)
  • wrap with section (probably the second most used)
  • I use IDEA so "snippets" like stlcomp sftcomp and syncomp for component with sync notifier
  • stateless into sync notifier component

Lints:

  • one if you forgot the list for preloaded notifiers
  • lints/errors for accessing web packages on the server (maybe that could sync with mode from pubspec?)

@schultek
Copy link
Owner

schultek commented Sep 8, 2024

What do you mean with sync notifier component?

@dinko7
Copy link

dinko7 commented Sep 8, 2024

What do you mean with sync notifier component?

Just checked the docs. I was talking about SyncNotifier from jaspr_riverpod that was used before to sync the notifier state to the client, but you have a new builder and an annotation to handle syncing to the client so feel free to disregard this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants