-
Notifications
You must be signed in to change notification settings - Fork 1
added popover for DRUF #8
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
base: iformredirect-compat
Are you sure you want to change the base?
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.
Pull Request Overview
This PR implements a popover feature for DRUF suggestions by adding new schema definitions, helper functions for suggestion handling, and a JavaScript module for UI interaction.
- Added a new YAML schema (suggestion_test_schema.yaml) incorporating suggestion formulas for various fields.
- Extended helper functions in helpers.py to support suggestion retrieval and validation.
- Configured web assets and included a new JavaScript module (scheming-suggestions.js) to display and manage the suggestion popover.
Reviewed Changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
ckanext/scheming/suggestion_test_schema.yaml | Introduces suggestion formulas and related schema fields. |
ckanext/scheming/helpers.py | Adds helper functions for suggestion handling with logging enhancements. |
ckanext/scheming/assets/webassets.yml | Configures a new web asset bundle for suggestions. |
ckanext/scheming/assets/js/scheming-suggestions.js | Provides the JavaScript logic for managing the suggestion popover behavior. |
Files not reviewed (6)
- ckanext/scheming/assets/resource.config: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/markdown.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/select.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/text.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestion_button.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestions_asset.html: Language not supported
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.
Pull Request Overview
This PR adds a popover for DRUF suggestions by introducing new snippets, helper functions, and JavaScript for enhanced user interaction with suggested field values.
- Added suggestions asset inclusion and snippet for rendering suggestion buttons.
- Integrated suggestion elements into text, select, and markdown form snippets.
- Introduced helper functions and a JS module to support suggestion retrieval, validation, and UI interactions.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ckanext/scheming/templates/scheming/snippets/suggestions_asset.html | Added asset inclusion for suggestions. |
ckanext/scheming/templates/scheming/snippets/suggestion_button.html | Implements UI for suggestion popovers and apply button. |
ckanext/scheming/templates/scheming/form_snippets/text.html, select.html, markdown.html | Integrated suggestion button and support into various form snippets. |
ckanext/scheming/suggestion_test_schema.yaml | Provides test schema examples with suggestion formulas. |
ckanext/scheming/helpers.py | Introduces helper functions to process suggestion data and validation. |
ckanext/scheming/assets/webassets.yml, assets/js/scheming-suggestions.js | Added new assets and a JavaScript module for managing suggestion popovers. |
Files not reviewed (1)
- ckanext/scheming/assets/resource.config: Language not supported
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR adds a new popover for DRUF suggestions by extending the dataset schema, providing new helper functions, and integrating a JavaScript module to handle popover interactions.
- Adds new suggestion fields and formulas in the dataset schema.
- Introduces helper functions for handling and validating suggestions.
- Implements a suggestion popover UI in JavaScript and updates asset configuration accordingly.
Reviewed Changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ckanext/scheming/suggestion_test_schema.yaml | Introduces new dataset field definitions and suggestion formula configurations. |
ckanext/scheming/helpers.py | Adds helper functions to support suggestion processing and validation. |
ckanext/scheming/assets/webassets.yml | Updates asset configuration to include the new suggestions JavaScript. |
ckanext/scheming/assets/js/scheming-suggestions.js | Implements the popover behavior for applying suggestions in the UI. |
Files not reviewed (6)
- ckanext/scheming/assets/resource.config: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/markdown.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/select.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/text.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestion_button.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestions_asset.html: Language not supported
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.
Pull Request Overview
This PR implements a popover functionality for DRUF field suggestions and integrates it into both the backend schema definitions and frontend interactions. Key changes include the addition of new suggestion-related helpers in Python, updates to the dataset schema for suggestion formulas, and a new JavaScript module and asset configuration to power the popover UI.
Reviewed Changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
ckanext/scheming/suggestion_test_schema.yaml | Adds new suggestion formulas and fields to the dataset schema. |
ckanext/scheming/helpers.py | Introduces helper functions for suggestion retrieval and validation. |
ckanext/scheming/assets/webassets.yml | Registers new assets for the suggestion popover functionality. |
ckanext/scheming/assets/js/scheming-suggestions.js | Implements the popover and related interactions in JavaScript. |
Files not reviewed (6)
- ckanext/scheming/assets/resource.config: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/markdown.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/select.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/text.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestion_button.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestions_asset.html: Language not supported
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.
Pull Request Overview
This PR introduces a popover component for displaying field suggestions in the DRUF interface and corresponding helper functions and asset configurations. Key changes include:
- A test schema file (suggestion_test_schema.yaml) with added suggestion formulas and popover-related properties.
- New helper functions in helpers.py for retrieving and validating field suggestions with added logging.
- New asset definitions and a JavaScript module (scheming-suggestions.js) to handle popover UI behavior.
Reviewed Changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
ckanext/scheming/suggestion_test_schema.yaml | Introduces a test schema with suggestion formulas for popovers. |
ckanext/scheming/helpers.py | Adds helper functions for suggestion processing and related logging. |
ckanext/scheming/assets/webassets.yml | Adds asset configuration for the suggestions module. |
ckanext/scheming/assets/js/scheming-suggestions.js | Implements popover interface with toggle, copy, and apply functionalities for suggestions. |
Files not reviewed (6)
- ckanext/scheming/assets/resource.config: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/markdown.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/select.html: Language not supported
- ckanext/scheming/templates/scheming/form_snippets/text.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestion_button.html: Language not supported
- ckanext/scheming/templates/scheming/snippets/suggestions_asset.html: Language not supported
Comments suppressed due to low confidence (1)
ckanext/scheming/helpers.py:483
- [nitpick] New helper functions for suggestion handling have been added without accompanying tests. Consider adding unit tests to verify their behavior.
def scheming_get_suggestion_value(field_name, data=None, errors=None, lang=None):
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.