Skip to content

[OSDEV-1830] SLC UAT Bug - Drop down menus under Additional information section do not show all available options#566

Merged
roman-stolar merged 7 commits intomainfrom
OSDEV-1830-taxonomy-only-in-apparel-sector
Mar 25, 2025
Merged

[OSDEV-1830] SLC UAT Bug - Drop down menus under Additional information section do not show all available options#566
roman-stolar merged 7 commits intomainfrom
OSDEV-1830-taxonomy-only-in-apparel-sector

Conversation

@roman-stolar
Copy link
Contributor

@roman-stolar roman-stolar commented Mar 19, 2025

OSDEV-1830 SLC UAT Bug - Drop down menus under Additional information section do not show all available options

  • Updated implementation to input any values for Location Type and Processing Type, except when the sector is Apparel—in that case, enforce taxonomy filters.
  • Updated UI tests for ProductionLocationInfo component to covered recent changes.

…essing Type, except when the sector is Apparel—in that case, enforce taxonomy filters.
@roman-stolar roman-stolar self-assigned this Mar 19, 2025
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:25 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:32 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Mar 19, 2025

Dedupe Hub App | Unittest test suite - Code coverage report

Total: 56.14%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:32 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Mar 19, 2025

Contricleaner App | Unittest test suite - Code coverage report

Total: 98.91%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Mar 19, 2025

Countries App | Unittest test suite - Code coverage report

Total: 100%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 19, 2025 11:33 — with GitHub Actions Inactive
@roman-stolar roman-stolar marked this pull request as ready for review March 20, 2025 15:39
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2025

📝 Walkthrough

Walkthrough

This pull request updates the RELEASE-NOTES.md file for version 2.1.0 of the Open Supply Hub project, adding a bug fix entry for issue OSDEV-1830, which modifies the Production Location Info page's implementation. It allows any values for Location Type and Processing Type, except for the Apparel sector, which enforces taxonomy filters. Changes to the ProductionLocationInfo component include the introduction of a new state variable for taxonomy filtering, updates to the rendering logic of select inputs, and modifications to related test cases.

Changes

File(s) Summary
doc/release/RELEASE-NOTES.md Added a new bug fix entry for OSDEV-1830 detailing changes to the Production Location Info page's input handling.
src/react/src/__tests__/components/ProductionLocationInfo.test.js Updated test cases to reflect new data-testid format for select elements and modified assertions to include "or enter" in prompt texts.
src/react/src/components/Contribute/ProductionLocationInfo.jsx Introduced a new state variable enabledTaxonomy for conditional rendering based on the Apparel sector and updated the rendering logic for StyledSelect components.

Possibly related PRs

Suggested reviewers

  • vladsha-dev
  • mazursasha1990
  • VadimKovalenkoSNF

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd93dd0 and 595614d.

📒 Files selected for processing (1)
  • doc/release/RELEASE-NOTES.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • doc/release/RELEASE-NOTES.md
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: run-integration-test-code-quality
  • GitHub Check: run-flake8-linter
  • GitHub Check: run-django-code-quality
  • GitHub Check: run-countries-code-quality
  • GitHub Check: run-dd-code-quality
  • GitHub Check: run-contricleaner-code-quality
  • GitHub Check: get-base-branch-django-cov
  • GitHub Check: get-base-branch-contricleaner-cov
  • GitHub Check: get-base-branch-countries-cov
  • GitHub Check: get-base-branch-dd-cov

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
doc/release/RELEASE-NOTES.md (3)

15-15: Remove Trailing Punctuation from Heading
The heading “#### Migrations:” on line 15 ends with a colon. According to markdown lint guidelines (MD026), trailing punctuation in headings should be removed.
Suggested change:

-#### Migrations:
+#### Migrations
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

15-15: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


30-30: Remove Trailing Punctuation from Another Heading
Similarly, the “### Release instructions:” heading on line 30 should not have a trailing colon.
Suggested change:

-### Release instructions:
+### Release instructions
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

30-30: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


32-33: Adjust Unordered List Indentation for Better Consistency
The nested bullet items on lines 32 and 33 are indented with 4 spaces. Markdown lint (MD007) expects an indentation of 2 spaces for nested lists. Please update these lines to use 2 spaces.
Suggested change:

-    * `migrate`
-    * `reindex_database`
+  * `migrate`
+  * `reindex_database`
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

32-32: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


33-33: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6aee1a1 and 9333bc4.

📒 Files selected for processing (3)
  • doc/release/RELEASE-NOTES.md (1 hunks)
  • src/react/src/__tests__/components/ProductionLocationInfo.test.js (1 hunks)
  • src/react/src/components/Contribute/ProductionLocationInfo.jsx (4 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
doc/release/RELEASE-NOTES.md

15-15: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


30-30: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


32-32: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


33-33: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (8)
src/react/src/__tests__/components/ProductionLocationInfo.test.js (1)

161-163: Changes to test assertions align with new UI behavior.

The test assertions have been updated to reflect the new functionality where users can now both select from predefined options or enter custom values for location and processing types.

src/react/src/components/Contribute/ProductionLocationInfo.jsx (6)

110-110: New state variable to control taxonomy filtering.

The enabledTaxonomy state variable is added to track when taxonomy filtering should be applied, which aligns with the described bug fix in OSDEV-1830.


404-408: Appropriate logic for enabling taxonomy filtering only for Apparel sector.

This effect correctly implements the requirement to enable taxonomy filtering only when the Apparel sector is the sole selection, matching the PR objectives.


731-735: Updated text reflects new functionality.

The helper text has been updated to indicate users can now "select or enter" values, which accurately reflects the new functionality where users can input custom values.


736-764: Conditional rendering of Location Type field based on sector selection.

This implementation correctly enforces taxonomy filtering for the Apparel sector while allowing free-form input for other sectors, addressing the bug mentioned in OSDEV-1830.


779-783: Updated text for Processing Type reflects new functionality.

Similar to the Location Type field, this helper text has been updated to indicate users can now "select or enter" values.


784-812: Conditional rendering of Processing Type field based on sector selection.

This implementation mirrors the Location Type field behavior, properly addressing the bug by enforcing taxonomy filtering only for the Apparel sector.

doc/release/RELEASE-NOTES.md (1)

6-11: Release 2.1.0 Section Added Successfully
The new section for Release 2.1.0 is clearly structured and provides all the high-level subsections (Introduction, Database changes, Code/API changes, Architecture/Environment changes, Bugfix, and Release instructions). This aligns well with the PR objectives and the AI-generated summary.

# Conflicts:
#	doc/release/RELEASE-NOTES.md
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
@roman-stolar roman-stolar temporarily deployed to Quality Environment March 20, 2025 15:43 — with GitHub Actions Inactive
Copy link
Contributor

@vladsha-dev vladsha-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

For the future, please run the text in PR descriptions and other places through ChatGPT or other tools to ensure there are no grammar mistakes.
Screenshot 2025-03-24 at 16 58 56

Copy link
Collaborator

@protsack-stephan protsack-stephan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sonarqubecloud
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants