-
Notifications
You must be signed in to change notification settings - Fork 4
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
refactor(Project Authoring): Extract copy node location selection feature to component #1397
refactor(Project Authoring): Extract copy node location selection feature to component #1397
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I found a bug but it also occurs on production. Copy a step from inactive steps and put into inactive activity will fail and throw an error. This happens on production too so we could fix it in another issue.
I think having separate html template files for these files would be more consistent, cleaner and more organized. Inline templates do not have syntax highlighting which makes it harder to read. If you search for something in a template and only include *.html files in your search, you won't get results from inline templates. Separate html files would also follow the model-view-controller pattern better and have better separation of concerns.
- insert-node-after-button.component.ts
- insert-node-inside-button.component.ts
- node-icon-and-title.component.ts
- node-with-move-after-button.component.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Made a few minor style updates.
I was also wondering about the decision to put the template in the component definition rather than separate html files for some components. Is it because the templates are small and have no css? Should we discuss conventions for this?
Thanks for the styling changes. Yes, let's discuss conventions for inline template. Angular's style guide suggests putting template and styles into a separate file if it's more than 3 lines:
Even though these components were more than 3 lines (some due to line-wrapping), I put the templates directly in the components because the component classes were simple classes (only included inputs and outputs), templates were simple, and I didn't think they obscured the purpose and implementation of the classes. It's also nice to see the template and code together (no need to open two editors). Anyway, let's discuss. |
🎉 This PR is included in version 5.108.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Notes
Changes
Test
Closes #1396