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

Move page-editor-specific widgets to @/pageEditor #4887

Closed
fregante opened this issue Dec 26, 2022 · 10 comments
Closed

Move page-editor-specific widgets to @/pageEditor #4887

fregante opened this issue Dec 26, 2022 · 10 comments
Assignees
Labels

Comments

@fregante
Copy link
Contributor

fregante commented Dec 26, 2022

IIRC, SelectorMatchWidget only works in a Page Editor context, because it includes selector fields. Although, it might work in other contexts and just show a plain text field. So it's easiest to assume it should live in the Page Editor subdirectory

CssClassWidget is also only used in the Page Editor currently. Although, it doesn't depend on any field widgets that are page-editor specific

Long term, we'd likely have 2 folders:

  • Universal Widgets that work in any context
  • Page Editor-specific widgets that take advantage of the Page Editor context

Related:

@fregante
Copy link
Contributor Author

fregante commented Dec 26, 2022

Also potential improvement in #4728 (comment)

Would it make sense to move @/contrib/uipath/LocalProcessOptions.tsx to @/pageEditor?

Can we find a (naming?) pattern that helps us maintain safety? For example LocalProcessOptions.pageEditor.tsx would be enforceable via our eslint rule, rather than being an unsafe exception:

@BLoe
Copy link
Contributor

BLoe commented Jun 27, 2023

@grahamlangford Not sure how this specific ticket fits into our more general effort around modules and the import lint rules, but should probably be closed in favor of more comprehensive lint-rule/module/folder-structure changes I think? Maybe worth keeping around and tracking as a key-result of that work? Meaning, make sure this specific situation is handled.

Copy link

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

@github-actions github-actions bot added the Stale label Jan 25, 2024
Copy link

github-actions bot commented Feb 2, 2024

This issue was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
@fregante
Copy link
Contributor Author

fregante commented Feb 7, 2024

This is still useful in the context of enforcing imports in the right context via no-restricted-paths:

It's a low-risk "quick" change because it just involves moving files around.

Proposed steps

  1. Search for the pageEditor/ string in /components files
  2. Move all the matched components to @/pageEditor/components
Screenshot

Also maybe:

  1. Move any remaining components that are only meant to be used in the page editor, even if they don't use pageEditor-specific APIs

@fregante fregante reopened this Feb 7, 2024
@fregante fregante added small T-shirt sizing and removed Stale low priority labels Feb 7, 2024
Copy link

github-actions bot commented May 8, 2024

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

@grahamlangford
Copy link
Collaborator

@BLoe considering our Engineering Metrics conversation, this seems like an issue we should pick up as a quick 30% time

@BLoe
Copy link
Contributor

BLoe commented May 8, 2024

Yeah probably worth doing, although this ticket as described might be a huge scope 🤷

@grahamlangford
Copy link
Collaborator

Yeah probably worth doing, although this ticket as described might be a huge scope 🤷

I'm open to breaking it up into multiple issues or PRs.

@twschiller
Copy link
Contributor

twschiller commented Jun 16, 2024

I opened two PRs to close out this issue for now:

Would it make sense to move @/contrib/uipath/LocalProcessOptions.tsx to @/pageEditor? Can we find a (naming?) pattern that helps us maintain safety? For example LocalProcessOptions.pageEditor.tsx

For developer ergonomics, we want to keep the concerns local. I'd be in favor of introducing a naming rule like LocalProcessOptions.pageEditor.tsx to allow automatic enforcement via

A similar issue comes up with the document builder. The render directory contains code that is used outside of the page editor. We could introduce a shared directory naming convention for utilities/components that need to be "exported" from a context

I've created follow up issue here to enforce as a rule: #8630

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

No branches or pull requests

4 participants