-
Notifications
You must be signed in to change notification settings - Fork 37
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
Feature/update extension docs #1028
Conversation
…in the frontend w/ burnettk
…e support for CustomForm from extensions w/ burnettk
WalkthroughWalkthroughThe recent changes encompass a comprehensive update to streamline extension development and integration within the application. This includes refining UI schema configurations, optimizing backend service logic, and enhancing frontend components. The primary focus is on improving extension creation processes, user interaction through customized UI elements, and building a more dynamic extension ecosystem. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (7)
- .github/workflows/docker_image_for_main_builds.yml (1 hunks)
- docs/Building_Diagrams/Extensions.md (2 hunks)
- spiffworkflow-backend/src/spiffworkflow_backend/services/process_model_service.py (1 hunks)
- spiffworkflow-frontend/src/components/CustomForm.tsx (5 hunks)
- spiffworkflow-frontend/src/components/ExtensionUxElementForDisplay.tsx (1 hunks)
- spiffworkflow-frontend/src/extension_ui_schema_interfaces.ts (2 hunks)
- spiffworkflow-frontend/src/routes/Extension.tsx (10 hunks)
Additional comments: 28
spiffworkflow-frontend/src/components/ExtensionUxElementForDisplay.tsx (3)
- 21-25: Ensure the filtering logic correctly matches the
display_location
with the provideddisplayLocation
. This is crucial for displaying the correct UI elements.- 26-28: The mapping logic to execute
elementCallback
for each filtered element is appropriate. Confirm thatelementCallback
handles all necessary UI rendering or actions for the elements.- 31-31: The handling of the scenario where no elements match the
displayLocation
and anelementCallbackIfNotFound
is provided is correctly implemented. This ensures a fallback action or rendering when no elements are found.docs/Building_Diagrams/Extensions.md (5)
- 8-12: The introduction to extensions, including implementation details and access setup via permissions, is clear and informative. Ensure all necessary details for setting up and configuring extensions are included.
- 26-26: The documentation on setting the environment variable for enabling extensions is clear. Verify that the variable name and value are correctly specified.
- 33-37: The steps for creating an extension are well-detailed. Ensure the process model repository navigation and file creation instructions are accurate and easy to follow.
- 41-47: The example extension provided is helpful for understanding how to implement specific features using extensions. Confirm that the example is complete and the GitHub link is accessible.
- 53-61: The use cases section effectively illustrates the versatility of extensions. Ensure that the examples given are relevant and demonstrate practical applications of extensions.
spiffworkflow-frontend/src/extension_ui_schema_interfaces.ts (10)
- 1-8: The introduction and comments provide a clear overview of the configurations for the extension UI schema. Ensure the documentation is comprehensive and understandable.
- 10-24: The
UiSchemaDisplayLocation
enum is well-defined, covering all possible display locations for extensions. Confirm that all locations are relevant and correctly named.- 28-31: The
UiSchemaPersistenceLevel
enum clearly defines the persistence levels for process instances. Ensure the descriptions are accurate and the enum values are appropriate.- 37-49: The
UiSchemaPageComponentList
enum lists supported components for pages. Verify that all components are included and correctly named.- 51-56: The
UiSchemaLocationSpecificConfig
interface specifies configs for certain display locations. Ensure the interface is correctly defined and covers all necessary configurations.- 1-63: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [60-75]
The interfaces for defining UX elements, forms, and actions are well-structured and provide clear guidelines for configuring extensions. Confirm that all properties are necessary and correctly typed.
- 119-147: The interfaces for page components and definitions are comprehensive, covering various aspects of extension UI configuration. Ensure the definitions are complete and accurately reflect the intended functionality.
- 150-183: The
UiSchemaPageDefinition
andUiSchemaPage
interfaces are correctly structured to define pages and their components. Verify that all attributes are appropriately used and named.- 191-201: The
ExtensionUiSchema
top-level object interface is well-documented and structured. Confirm that it accurately represents the extension UI schema configuration.- 204-221: The API call types and response interfaces are clearly defined. Ensure they align with the backend API specifications and correctly handle the data exchange.
.github/workflows/docker_image_for_main_builds.yml (1)
- 34-34: The branch triggering the workflow has been updated to
feature/update-extension-docs
. Confirm that this branch name aligns with the project's feature development and naming conventions.spiffworkflow-frontend/src/components/CustomForm.tsx (2)
- 30-30: The addition of the
submitButtonText
prop toCustomForm
allows for customizable submit button text. Ensure the prop is optional and correctly handled in the component's logic.- 363-370: The conditional rendering of the submit button based on the
submitButtonText
prop is correctly implemented. Verify that the button is appropriately styled and accessible.spiffworkflow-frontend/src/routes/Extension.tsx (6)
- 13-13: Import of
makeid
from '../helpers' is added. Ensure that this function is used appropriately and that the import is necessary.- 46-46: Variable
_processModel
is renamed toprocessModel
. Verify that all instances of_processModel
have been updated toprocessModel
to maintain consistency.- 71-71:
CustomForm
is added tosupportedComponents
. Ensure thatCustomForm
is implemented correctly and that its inclusion aligns with the intended functionality of the extension.- 278-300: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [219-297]
Updates to
processSubmitResult
andhandleFormSubmit
functions include additional parameters and logic enhancements. Ensure that these changes are correctly implemented, do not introduce any regressions, and improve the functionality as intended. Specifically, verify the handling of API paths and the processing of form submission results.
- 308-342: Enhancements to
renderComponentArguments
function to handle arguments for components, especially forCustomForm
. Verify that the logic correctly processes component arguments and integrates with the rest of the component rendering process.- 376-386: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [379-411]
Updated usage of
handleFormSubmit
andrenderComponentArguments
in component rendering. Ensure that these updates are correctly applied and that they integrate seamlessly with the existing component rendering logic.spiffworkflow-backend/src/spiffworkflow_backend/services/process_model_service.py (1)
- 252-252: Modification to the logic for filtering process models based on
filter_runnable_by_user
orfilter_runnable_as_extension
to only considerfilter_runnable_by_user
. Ensure this change aligns with the intended functionality and does not inadvertently exclude necessary filtering conditions.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (4)
- spiffworkflow-frontend/src/components/ReactFormBuilder/ReactFormBuilder.tsx (1 hunks)
- spiffworkflow-frontend/src/extension_ui_schema_interfaces.ts (2 hunks)
- spiffworkflow-frontend/src/routes/Extension.tsx (11 hunks)
- spiffworkflow-frontend/src/routes/ProcessModelShow.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
- spiffworkflow-frontend/src/components/ReactFormBuilder/ReactFormBuilder.tsx
Files skipped from review as they are similar to previous changes (1)
- spiffworkflow-frontend/src/extension_ui_schema_interfaces.ts
Additional comments: 6
spiffworkflow-frontend/src/routes/Extension.tsx (6)
- 12-12: Consider verifying the usage of
makeid
from '../helpers' to ensure it's utilized correctly within this file.- 45-45: Renaming
_processModel
toprocessModel
aligns with naming conventions. Ensure all references to this variable are updated accordingly.- 70-70: Adding
CustomForm
tosupportedComponents
is appropriate for extending functionality. Confirm thatCustomForm
is implemented correctly and integrates well with existing components.- 273-295: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [218-292]
The modifications in
processSubmitResult
andhandleFormSubmit
functions, including the addition of an extra parameter and updated logic, require thorough testing to ensure they handle form submissions as expected, especially with the newCustomForm
component.
- 304-338: The enhancements in
renderComponentArguments
for handling arguments, particularly forCustomForm
, improve modularity and flexibility. Verify that these changes do not introduce any regressions in how components are rendered and interact with user inputs.- 367-371: Ensure that the updated usage of
handleFormSubmit
andrenderComponentArguments
in component rendering does not negatively impact the user experience or introduce any performance issues.
This adds documentation for extensions and updates extensions to use components over the top level keys for form submission.
Summary by CodeRabbit
New Features
Refactor
Documentation