Skip to content
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

[OSDEV-1777] Make the URL style consistent for all routes of the SLC workflow. #533

Conversation

mazursasha1990
Copy link
Contributor

@mazursasha1990 mazursasha1990 commented Feb 21, 2025

OSDEV-1777 - SLC. Make the URL style consistent for all routes of the SLC workflow.

This PR establishes a consistent style across all pages of the SLC workflow. After these changes, the URL begins from /contribute/single-location/.

@mazursasha1990 mazursasha1990 self-assigned this Feb 21, 2025
Copy link

barecheck bot commented Feb 21, 2025

React App | Jest test suite - Code coverage report

Total: 29.56%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link

coderabbitai bot commented Feb 21, 2025

📝 Walkthrough

Walkthrough

The changes update the URL routing strings across tests, components, and constants. All instances of the term "production-location" have been replaced with "single-location" in the path definitions and test assertions. The updates affect tests verifying component navigation, route construction in event handlers, and utility functions, ensuring that the application now reflects the new routing structure.

Changes

File(s) Change Summary
src/react/.../__tests__/components/{ProductionLocationDetails.test.js, SearchByNameAndAddressSuccessResult.test.js, SearchByOsIdTab.test.js}
src/react/.../__tests__/utils.tests.js
Updated assertions and URL path strings from /contribute/production-location/... to /contribute/single-location/... in multiple test cases.
src/react/.../components/Contribute/{SearchByOsIdSuccessResult.jsx, SearchByOsIdTab.jsx} Modified URL routes in event handlers to use /contribute/single-location/... instead of /contribute/production-location/....
src/react/.../util/constants.jsx Revised route constants by replacing production-location with single-location across several endpoint definitions.
src/react/.../util/util.js Updated the URL pattern in makeContributeProductionLocationUpdateURL from /contribute/production-location/${osID}/info/ to /contribute/single-location/${osID}/info/.
doc/release/RELEASE-NOTES.md Added a new entry addressing issue OSDEV-1777, noting a consistent URL style established across the SLC workflow, starting from /contribute/single-location/.
src/react/.../__tests__/components/ContributeProductionLocation.test.js Updated the renderComponent function to use queryParams instead of initialEntries, simplifying test cases related to tab selection.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant C as Search Component
    participant R as Router
    participant H as History

    U->>C: Trigger search action (e.g., click "Select" or "Search")
    C->>R: Build new URL using updated path (/contribute/single-location/...)
    R->>H: Invoke navigation (history.push with new URL)
    H-->>U: Navigate to updated route
Loading

Possibly related PRs

  • [OSDEV-1698] Fix link for submit another location button #505: The changes in the main PR and the retrieved PR are related as both involve modifications to the routing logic, specifically updating paths from "production-location" to "single-location" in their respective test cases and components.
  • [OSDEV-1745] Make the Search by Name and Address tab default. #528: The changes in the main PR, which involve updating the routing paths in tests for the ProductionLocationDetails component, are related to the modifications in the retrieved PR that also adjust the routing logic for the ContributeProductionLocation component, specifically changing the default tab and associated paths.
  • [OSDEV-1697] Redirect to the main page from close dialog button #508: The changes in the main PR, which involve updating URL paths in tests for the ProductionLocationDetails component, are related to the modifications in the retrieved PR that also focus on changing URL paths for navigation within the application, specifically to the single-location endpoint.

Suggested reviewers

  • Innavin369
  • vladsha-dev
  • roman-stolar

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?

❤️ Share
🪧 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. (Beta)
  • @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 (5)
doc/release/RELEASE-NOTES.md (5)

12-14: Placeholder Text for Database Changes

The section "### Database changes" and its placeholder text are present. Ensure that, if applicable, the actual migration details will be added later.


15-17: Trailing Punctuation in Heading: "#### Migrations:"

The heading "#### Migrations:" ends with a colon, which triggers a markdownlint warning (MD026). To improve compliance with markdown best practices, consider removing the trailing punctuation.

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

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

(MD026, no-trailing-punctuation)


21-23: Code/API Changes Section

The "### Code/API changes" section currently contains placeholder text. If there are specific items or changes that impact the API, consider summarizing them briefly here.


30-32: "What's New" Section Placeholder

The "### What's new" section contains placeholder text. Once new features or enhancements are finalized, update this section to reflect specific improvements that impact the user experience.


33-37: Release Instructions Section: Markdown Improvements

The "### Release instructions:" heading ends with a colon, which markdownlint flags (MD026). Also, the unordered list items on lines 35 and 36 are indented with 4 spaces, while the preferred indentation is 2 spaces (MD007). Consider making these adjustments for improved readability and compliance:

-### Release instructions:
+### Release instructions

-    * `migrate`
-    * `reindex_database`
+  * `migrate`
+  * `reindex_database`

These changes will address the static analysis hints and help maintain clean markdown formatting.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD026, no-trailing-punctuation)


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

(MD007, ul-indent)


36-36: 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 88d82d4 and bf80e61.

📒 Files selected for processing (1)
  • doc/release/RELEASE-NOTES.md (1 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)


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

(MD026, no-trailing-punctuation)


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

(MD007, ul-indent)


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

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: run-integration-test-code-quality
  • GitHub Check: run-flake8-linter
  • GitHub Check: run-eslint-linter-and-prettier-formatter
  • GitHub Check: run-fe-code-quality
  • GitHub Check: run-django-code-quality
  • GitHub Check: run-dd-code-quality
  • GitHub Check: run-countries-code-quality
  • GitHub Check: run-contricleaner-code-quality
  • GitHub Check: get-base-branch-fe-cov
  • GitHub Check: get-base-branch-django-cov
  • GitHub Check: get-base-branch-countries-cov
  • GitHub Check: get-base-branch-dd-cov
  • GitHub Check: get-base-branch-contricleaner-cov
🔇 Additional comments (6)
doc/release/RELEASE-NOTES.md (6)

6-7: New Release Header Added for 1.31.0

The header "## Release 1.31.0" is clear and follows the semantic versioning style. This new section clearly demarcates the upcoming release details.


8-11: Introduction Section Verification

The "## Introduction" block correctly states the product name and release date. Please double-check that these details remain accurate as the release approaches.


18-20: Schema Changes Section Placeholder

The "#### Schema changes" section uses placeholder text. This structure is fine as long as you update it with the actual schema change details when available.


24-26: Architecture/Environment Changes Placeholder

This section "### Architecture/Environment changes" is correctly positioned. As with the previous sections, update with exact information as soon as it is available.


27-29: Bugfix Entry for OSDEV-1777

The bugfix section clearly documents that a consistent URL style has been established across all pages of the SLC workflow. It effectively communicates that URLs now begin with /contribute/single-location/.


37-38: Additional Release Instructions Detail

The detailed deployment instructions (especially the note on including the migrate and reindex_database commands and running the deploy pipeline with the specified flag) are clearly laid out. Just ensure that these instructions stay current with any future changes in your deployment process.

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

Copy link
Contributor

@roman-stolar roman-stolar left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@VadimKovalenkoSNF VadimKovalenkoSNF left a comment

Choose a reason for hiding this comment

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

LGTM

@mazursasha1990 mazursasha1990 merged commit 4df7948 into main Feb 25, 2025
21 checks passed
@mazursasha1990 mazursasha1990 deleted the OSDEV-1777-make-the-url-style-consistent-for-all-routes-of-the-slc-workflow branch February 25, 2025 12:44
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