Conversation
There was a problem hiding this comment.
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.
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 <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
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.
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):
87ed35e to
2667b1c
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new test schema for suggestions, adds helper functions with enhanced logging to support field suggestions, and incorporates a new JavaScript asset bundle intended for suggestions/popover functionality.
- New YAML schema file defining dataset and resource fields with suggestion formulas
- Additional helper functions in Python to extract and validate suggestion values with logging added
- New webassets entry to compile the suggestions JavaScript
Reviewed Changes
Copilot reviewed 4 out of 11 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ckanext/scheming/suggestion_test_schema.yaml | Newly added schema with fields and suggestion formulas |
| ckanext/scheming/helpers.py | New helper functions for handling suggestions and logging |
| ckanext/scheming/assets/webassets.yml | New asset bundle "suggestions" added for JS popover |
Files not reviewed (7)
- ckanext/scheming/assets/resource.config: Language not supported
- ckanext/scheming/assets/styles/scheming.css: 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
| - field_name: title | ||
| label: Title | ||
| preset: title | ||
| form_placeholder: eg. A descriptive title Custom |
There was a problem hiding this comment.
[nitpick] The placeholder text appears to include an extra word 'Custom'. You might consider removing it for clarity.
| form_placeholder: eg. A descriptive title Custom | |
| form_placeholder: eg. A descriptive title |
jqnatividad
left a comment
There was a problem hiding this comment.
Let's go ahead and merge this @minhajuddin2510 .
The best way to check for soundness is when it works in TWDH.
No description provided.