Skip to content

Feature/issue-1799#1580

Open
ZhmudAnastasiia wants to merge 1 commit intorelease/1.2.3from
feature/issue-1799
Open

Feature/issue-1799#1580
ZhmudAnastasiia wants to merge 1 commit intorelease/1.2.3from
feature/issue-1799

Conversation

@ZhmudAnastasiia
Copy link
Copy Markdown
Contributor

@ZhmudAnastasiia ZhmudAnastasiia commented May 19, 2025

dev

JIRA

ita-social-projects/StreetCode#2385
ita-social-projects/StreetCode#1799

Summary of issue

The design does not match the mockup, there is no checkmark image when deleting an account

Summary of change

Changed the design of modal windows to match the mockup. Corrected the placement of fields. Added an image when deleting an account.

Summary by CodeRabbit

  • New Features

    • Confirmation modals now feature a custom close icon and enhanced styling.
    • File upload prompts in admin modals now display an SVG icon and updated instructional text.
  • Bug Fixes

    • Minor typo corrected in the account deletion confirmation message.
  • Style

    • Improved modal and form styling across admin and common components, including updated button, label, checkbox, and input appearances.
    • Enhanced visual consistency by updating modal header class names and adjusting font sizes, weights, colors, and spacing.
    • Refined character counter display in the editor and streamlined related styles.
  • Documentation

    • Updated label and validation messages for term descriptions to improve clarity.
  • Refactor

    • Removed redundant or unused inline styles and background images from modal components.
    • Simplified and reorganized SCSS rules for better maintainability and visual alignment.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2025

Walkthrough

This update focuses on refining UI components and their styles across various modal dialogs and form elements. Changes include label text adjustments, improved localization, consistent header styling, enhanced button and input appearances, and the introduction of SVG icons for file upload prompts. No changes were made to exported or public entity signatures.

Changes

File(s) Change Summary
src/app/common/components/Editor/QEditor.component.tsx, QEditor.styles.scss Removed static label from character counter; updated counter format and styling for clarity and consistency.
src/app/common/components/modals/ArtGalleryTemplates/ArtGalleryTemplatesModal.component.tsx, ArtGalleryTemplatesModal.scss Removed background image from modal; updated heading font weight and removed explicit color.
src/app/common/components/modals/ConfirmationModal/ConfirmationModal.component.tsx, ConfirmationModalstyle..scss Introduced custom CSS and SVG close icon; added new styles for modal and confirmation text.
src/app/common/components/modals/Partners/PartnersModal.styles.scss Increased font size for form items within the contact form.
src/app/common/components/modals/Terms/AddTerm/AddTermModal.component.tsx, AddTermModal.styles.scss Changed label and validation message for description field; updated heading and input styles for clarity.
src/app/common/components/modals/Terms/DeleteTerm/DeleteTermModal.component.tsx, DeleteTermModal.styles.scss Localized button text and refined modal phrasing; expanded and centralized modal styles.
src/app/common/components/modals/Terms/EditTerm/EditTermModal.styles.scss Removed color styling from modal heading.
src/features/AdminPage/AdminModal.styles.scss Refined modal header styling, increased font weight, and enhanced input and checkbox appearance.
src/features/AdminPage/CategoriesPage/CategoriesPage/CategoryAdminModal.component.tsx, ContextPage/ContextModal/ContextAdminModal.component.tsx, JobsPage/JobsModal/JobsModal.component.tsx, TagsPage/TagsPage/TagAdminModal.tsx, TeamPositionsPage/TeamPositionsModal/TeamPositionsAdminModal.component.tsx Standardized modal header class name from "center" to "header_modal" for consistent layout.
src/features/AdminPage/JobsPage/JobsModal/JobsModal.styles.scss Closed .textWrapper block and set form label font size to 16px.
src/features/AdminPage/NewStreetcode/MainNewStreetcode.styles.scss Added custom button width and increased form label font size.
src/features/AdminPage/NewsPage/NewsModal/NewsModal.component.tsx, NewsModal.styles.scss Updated upload prompt to use SVG icon and new text; added styles for date picker.
src/features/AdminPage/PartnersPage/PartnerModal/PartnerModal.component.tsx, PartnerModal.styles.scss Swapped checkbox names and labels, updated upload prompt, removed streetcode select, and extensively enhanced modal and form styling.
src/features/AdminPage/TeamPage/TeamModal/TeamModal.component.tsx, TeamModal.styles.scss Made social link fields optional, updated upload prompt, adjusted modal header class, and improved checkbox and button styling.
src/features/AdminPage/TermDictionary/TermDictionary.styles.scss Commented out redundant input styles, reorganized button styling, and softened input borders.
src/features/UserProfile/DeleteModalConfirm/DeleteModalConfirm.component.tsx Replaced modal title with custom content block and fixed typo in confirmation message.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Modal
  participant SVGIcon
  participant Form

  User->>Modal: Open modal (e.g., Add/Edit/Upload)
  Modal->>Form: Render form fields
  Form->>SVGIcon: Display upload prompt with SVG
  User->>Form: Fill fields, upload files
  Form->>Modal: Submit or cancel
  Modal->>User: Show feedback/close
Loading

Poem

In the modals’ gentle glow,
New icons and headers now show.
Checkboxes swapped, labels refined,
Buttons and prompts redesigned.
With colors and fonts all anew,
The UI shines—sleek, clear, and true!
🖼️✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/app/common/components/Editor/QEditor.component.tsx

Oops! Something went wrong! :(

ESLint: 8.42.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

src/app/common/components/modals/Terms/DeleteTerm/DeleteTermModal.component.tsx

Oops! Something went wrong! :(

ESLint: 8.42.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

src/features/AdminPage/ContextPage/ContextModal/ContextAdminModal.component.tsx

Oops! Something went wrong! :(

ESLint: 8.42.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

  • 10 others

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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.

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
Copy Markdown
Contributor

@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: 2

🔭 Outside diff range comments (1)
src/app/common/components/modals/ArtGalleryTemplates/ArtGalleryTemplatesModal.scss (1)

1-8: 🛠️ Refactor suggestion

Clean up duplicate and inconsistent @use imports
We currently import the same utilities and mixins multiple times (and one incorrect path), which can lead to confusion and unnecessary compiler overhead. Consolidate to a single import for each module, use consistent aliasing, and prefer double quotes throughout.

Proposed diff:

-@use "@assets/sass/_utils.functions.scss" as *;
-@use "@assets/sass/_utils.functions.scss" as fnc;
-@use "@sass/_utils.functions.scss" as f;
+@use "@assets/sass/_utils.functions.scss" as fnc; // utility functions

-@use "@assets/sass/mixins/_utils.mixins.scss" as mut;
-@use '@assets/sass/mixins/_utils.mixins.scss' as ut;
+@use "@assets/sass/mixins/_utils.mixins.scss" as mut; // utility mixins

 // keep other @use statements unchanged

Additionally, update any @include ut.* calls to @include mut.* (e.g., lines 66–68) to match the consolidated alias.

🧹 Nitpick comments (4)
src/app/common/components/modals/ArtGalleryTemplates/ArtGalleryTemplatesModal.scss (1)

16-16: Verify the increased font weight against the mockup
The heading in .ArtGalleryImgContainer h1 was bumped from 500 to 700. Please confirm this heavier weight matches the design spec and that the removal of the explicit white color doesn't introduce contrast issues on the actual background. Consider adding a line-height parameter to the mixin for consistent vertical rhythm if needed.

src/app/common/components/modals/Partners/PartnersModal.styles.scss (1)

100-103: Ensure consistent typography units.

You’ve increased .ant-form-item font size to 2em, which improves readability. To maintain cohesion with other components, consider using the SCSS utility (e.g., f.pxToRem) or a design token instead of raw em units.

src/app/common/components/modals/Terms/AddTerm/AddTermModal.styles.scss (1)

33-36: Improve SCSS formatting consistency

While the styling changes for the textarea height are functionally correct, the formatting is inconsistent with the rest of the file's style. Consider adjusting the indentation and brace placement to match the conventional format used elsewhere.

-.addModal{
-.ant-input-textarea-show-count >.ant-input {
-    height: 150px;
-}}
+.addModal {
+    .ant-input-textarea-show-count > .ant-input {
+        height: 150px;
+    }
+}
src/app/common/components/modals/ConfirmationModal/ConfirmationModalstyle..scss (1)

1-31: Fix the stylesheet filename.

The stylesheet has excellent modal styling that aligns with the design requirements, but there's a typo in the filename with two periods (ConfirmationModalstyle..scss).

Rename the file to correct the double period:

-ConfirmationModalstyle..scss
+ConfirmationModalstyle.scss

Also update the import in the component file accordingly.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 7099557 and 6c9e78c.

⛔ Files ignored due to path filters (2)
  • src/assets/images/admin-panel/upload-image.svg is excluded by !**/*.svg
  • src/assets/images/user-profile/check-circle.svg is excluded by !**/*.svg
📒 Files selected for processing (28)
  • src/app/common/components/Editor/QEditor.component.tsx (1 hunks)
  • src/app/common/components/Editor/QEditor.styles.scss (1 hunks)
  • src/app/common/components/modals/ArtGalleryTemplates/ArtGalleryTemplatesModal.component.tsx (0 hunks)
  • src/app/common/components/modals/ArtGalleryTemplates/ArtGalleryTemplatesModal.scss (1 hunks)
  • src/app/common/components/modals/ConfirmationModal/ConfirmationModal.component.tsx (3 hunks)
  • src/app/common/components/modals/ConfirmationModal/ConfirmationModalstyle..scss (1 hunks)
  • src/app/common/components/modals/Partners/PartnersModal.styles.scss (1 hunks)
  • src/app/common/components/modals/Terms/AddTerm/AddTermModal.component.tsx (1 hunks)
  • src/app/common/components/modals/Terms/AddTerm/AddTermModal.styles.scss (1 hunks)
  • src/app/common/components/modals/Terms/DeleteTerm/DeleteTermModal.component.tsx (1 hunks)
  • src/app/common/components/modals/Terms/DeleteTerm/DeleteTermModal.styles.scss (2 hunks)
  • src/app/common/components/modals/Terms/EditTerm/EditTermModal.styles.scss (1 hunks)
  • src/features/AdminPage/AdminModal.styles.scss (6 hunks)
  • src/features/AdminPage/CategoriesPage/CategoriesPage/CategoryAdminModal.component.tsx (3 hunks)
  • src/features/AdminPage/ContextPage/ContextModal/ContextAdminModal.component.tsx (2 hunks)
  • src/features/AdminPage/JobsPage/JobsModal/JobsModal.component.tsx (1 hunks)
  • src/features/AdminPage/JobsPage/JobsModal/JobsModal.styles.scss (1 hunks)
  • src/features/AdminPage/NewStreetcode/MainNewStreetcode.styles.scss (2 hunks)
  • src/features/AdminPage/NewsPage/NewsModal/NewsModal.component.tsx (4 hunks)
  • src/features/AdminPage/NewsPage/NewsModal/NewsModal.styles.scss (1 hunks)
  • src/features/AdminPage/PartnersPage/PartnerModal/PartnerModal.component.tsx (4 hunks)
  • src/features/AdminPage/PartnersPage/PartnerModal/PartnerModal.styles.scss (3 hunks)
  • src/features/AdminPage/TagsPage/TagsPage/TagAdminModal.tsx (1 hunks)
  • src/features/AdminPage/TeamPage/TeamModal/TeamModal.component.tsx (5 hunks)
  • src/features/AdminPage/TeamPage/TeamModal/TeamModal.styles.scss (3 hunks)
  • src/features/AdminPage/TeamPositionsPage/TeamPositionsModal/TeamPositionsAdminModal.component.tsx (2 hunks)
  • src/features/AdminPage/TermDictionary/TermDictionary.styles.scss (4 hunks)
  • src/features/UserProfile/DeleteModalConfirm/DeleteModalConfirm.component.tsx (2 hunks)
💤 Files with no reviewable changes (1)
  • src/app/common/components/modals/ArtGalleryTemplates/ArtGalleryTemplatesModal.component.tsx
🔇 Additional comments (62)
src/app/common/components/modals/Terms/EditTerm/EditTermModal.styles.scss (2)

23-26: Standardize heading styling by removing color override.

The removal of the dark red color property from the h2 inside .editModal .ant-modal-body brings this modal in line with the approved mockup and sibling term modals. Heading text will now inherit the default theme color, improving consistency.


33-33: Clean up trailing whitespace.

A minor whitespace removal helps keep the codebase tidy. No functional impact.

src/features/AdminPage/TagsPage/TagsPage/TagAdminModal.tsx (1)

133-135: Unify modal header container class.

Switching the wrapper div from "center" to "header_modal" aligns this modal with other admin modals and their shared CSS. Ensure the corresponding .header_modal rules are up-to-date in your global stylesheet.

src/features/AdminPage/TermDictionary/TermDictionary.styles.scss (4)

55-57: Introduce .underTableZone container.

You’ve added a flex container for elements under the table. Please verify that the component markup uses .underTableZone; if it’s unused, consider removing it to reduce dead code.


71-78: Comment out redundant input-wrapper styles.

Removing these hard-coded styles for .ant-input-affix-wrapper avoids conflicts with global design tokens and improves maintainability.


108-112: Adjust input wrapper border weight.

Changing the border to 1px solid c.$slider-base-dot-color lightens the visual weight and aligns with other form inputs across the admin UI.


113-134: Verify updated button dimensions in .container-justify-end.

The button width has increased from 100px to 150px and border-radius adjusted to 7px. Please confirm these values match the mockup and work across all breakpoints, especially in narrow viewports.

src/app/common/components/modals/Terms/AddTerm/AddTermModal.component.tsx (1)

84-87: Update form label and validation message.

Changing "Визначення" to "Опис" and its message ensures clarity and better localization. This matches the design spec and improves user guidance.

src/app/common/components/Editor/QEditor.component.tsx (1)

148-149: Simplified character counter display
Removed the static label and now show only {characterCount}/{maxChars}, which aligns with the mockup and improves clarity.

src/app/common/components/Editor/QEditor.styles.scss (1)

23-27: Refine .charsCounter styling
Switching to a relative font size, normal weight, and a softer text color (rgba(0, 0, 0, 0.45)) harmonizes the counter with surrounding UI elements.

src/features/AdminPage/JobsPage/JobsModal/JobsModal.component.tsx (1)

158-158: Verify that .header_modal style is defined
The header container class was renamed from "center" to "header_modal"—please confirm that this selector is implemented in JobsModal.styles.scss (or a global stylesheet), so the header renders with the intended styling.

src/features/AdminPage/NewsPage/NewsModal/NewsModal.styles.scss (1)

20-23: Updated date picker styling for consistency
The .ant-picker height and box‐shadow now match the design spec, ensuring the date picker aligns visually with other form controls.

src/features/AdminPage/JobsPage/JobsModal/JobsModal.styles.scss (1)

11-14: Close .textWrapper block and standardize form label size
Added the missing closing brace and set form item label font size to 16px, matching other admin modals for visual consistency.

src/features/AdminPage/TeamPositionsPage/TeamPositionsModal/TeamPositionsAdminModal.component.tsx (2)

46-47: Improved code formatting and readability.

The removal of trailing whitespace in the function calls improves code consistency. This type of cleanup helps maintain a professional and standardized codebase.


119-119: Enhanced modal header styling with consistent class naming.

Changing from "center" to "header_modal" class establishes better semantic meaning and aligns this component with the standardized modal header styling pattern used across the admin interface.

src/features/AdminPage/ContextPage/ContextModal/ContextAdminModal.component.tsx (2)

49-49: Improved code formatting for better readability.

The whitespace adjustment in the uniquenessValidator function call maintains consistent code style throughout the codebase.


124-124: Standardized modal header styling.

Changing from "center" to "header_modal" class ensures consistent styling of modal headers across the admin interface, improving the overall user experience.

src/features/AdminPage/NewStreetcode/MainNewStreetcode.styles.scss (2)

8-10: Enhanced button styling with standardized width.

Adding a fixed width (250px) to the .streetcode-custom-button within the container provides better visual consistency across forms and modals. This standardization improves the overall UI appearance.


136-136: Improved form label visibility with larger text.

Increasing the font size of form labels from 16px to 20px enhances readability and accessibility, making the forms more user-friendly, especially on higher resolution displays.

src/features/AdminPage/CategoriesPage/CategoriesPage/CategoryAdminModal.component.tsx (3)

18-18: Added visual asset for upload functionality.

The addition of the UploadImg SVG import prepares for enhancing the file uploader with a visual indicator, improving the user experience by making the upload area more intuitive.


199-199: Standardized modal header styling.

Changing from "center" to "header_modal" class maintains consistent styling across all modal components in the admin interface, creating a cohesive user experience.


242-243: Enhanced file upload UI with visual cues.

Adding the SVG image alongside clear instructional text significantly improves the usability of the file upload component by providing visual guidance for users. This change makes the upload functionality more intuitive and aligns with modern UI design practices.

src/app/common/components/modals/Terms/DeleteTerm/DeleteTermModal.component.tsx (1)

31-34: UI improvements with localized button text and clearer heading

The changes enhance the modal's usability by adding explicit Ukrainian button labels ("Підтвердити" and "Скасувати") and improving the phrasing of the confirmation question. This creates a more native experience for Ukrainian users and makes the action intentions clearer.

src/features/UserProfile/DeleteModalConfirm/DeleteModalConfirm.component.tsx (1)

7-7: Great addition of the checkmark confirmation UI

These changes successfully implement the missing checkmark image mentioned in the PR description. The centered layout with the green checkmark icon and bold confirmation text creates a clear visual indication of successful account deletion. The typo fix in the redirection message is also a good catch.

Also applies to: 26-26, 32-37, 39-39

src/features/AdminPage/NewsPage/NewsModal/NewsModal.component.tsx (4)

10-10: Good addition of the upload image SVG asset.

The addition of the UploadImg SVG import enhances the file uploader UI and helps align with the design mockups mentioned in the PR objectives.


309-309: Consistent header class update.

Changing from "center" to "header_modal" improves styling consistency across modal components, which supports the PR objective of ensuring modal windows match the mockup design.


406-407: Improved file uploader UI with visual cues.

Replacing plain text with an SVG icon and clear instructional text enhances user experience and provides better visual guidance for the file upload action.


416-419: Better attribute formatting for DatePicker.

The improved formatting of DatePicker attributes makes the code more readable and maintainable, which is a good practice.

src/app/common/components/modals/ConfirmationModal/ConfirmationModal.component.tsx (3)

3-4: Good addition of stylesheet and custom close button.

Adding a dedicated stylesheet and custom close button improves the modal's visual appearance and helps maintain UI consistency across the application.


14-15: Enhanced modal styling and consistent close icon.

Adding the "confirmation-modal" class and custom close icon improves visual consistency with other modals in the application, supporting the PR objective of updating modal designs to match mockups.


33-33: Improved text styling with conditional class.

The conditional class application for confirmation text enhances the appearance of the modal while maintaining flexibility for different text content.

src/app/common/components/modals/ConfirmationModal/ConfirmationModalstyle..scss (2)

11-19: Well-implemented close button styling.

The modal close button styling with absolute positioning, circular shape, and hover effect creates a polished UI element that aligns with modern design standards.


23-30: Good footer layout implementation.

The flex layout implementation for the modal footer ensures consistent button spacing and alignment, which improves the overall user experience.

src/features/AdminPage/TeamPage/TeamModal/TeamModal.component.tsx (3)

27-27: Good addition of upload image asset.

Importing the UploadImg SVG enhances the file uploader UI, consistent with changes in other modal components.


281-281: Consistent header class update.

Changing from "center" to "header_modal" ensures styling consistency across all modal components in the application.


356-357: Enhanced file uploader UI.

Adding the SVG icon and clear instructional text improves the user experience for file uploads, matching the UI improvements in other modals.

src/app/common/components/modals/Terms/DeleteTerm/DeleteTermModal.styles.scss (4)

6-8: Improved modal positioning with vertical centering.

Adding align-items: center to the modal wrapper ensures the modal appears vertically centered on the screen, creating a more balanced and professional appearance.


9-19: Enhanced modal appearance with consistent text alignment and button styling.

The text centering and footer adjustments create a more polished user interface. The consistent button height (40px) aligns with design standards, and the border color specification ensures visual harmony with the rest of the application.


20-35: Fixed modal content width and positioning.

Setting a specific width (700px) with a left margin offset ensures the modal has consistent dimensions across different screen sizes. The nested structure for the .submit button maintains proper CSS organization.


45-48: Refined close button positioning and appearance.

The repositioned close button with reduced size (60px circular shape) creates a cleaner appearance while maintaining the expected functionality. The absolute positioning ensures it appears consistently relative to the modal.

src/features/AdminPage/PartnersPage/PartnerModal/PartnerModal.component.tsx (6)

14-14: Added visual enhancement with SVG upload icon.

The imported UploadImg SVG will improve the visual cues for the file upload functionality, making the interface more intuitive and user-friendly.


336-344: Standardized modal header styling with more prominent typography.

Changing from .center to .header_modal class aligns with the project-wide styling pattern. The addition of the bold tag (<b>) increases visual prominence of the header, making the modal purpose clearer to users.


346-353: Corrected checkbox naming and labeling for "isVisibleEverywhere".

The name prop was updated to properly match its functionality, and the label text now clearly communicates the purpose of this setting to users.


355-362: Corrected checkbox naming and labeling for "isKeyPartner".

Similar to the previous checkbox, the name prop was updated to properly match its functionality, aligning the UI with the underlying data model.


431-433: Enhanced file upload interface with visual cues.

The addition of the SVG icon and improved instructional text make the upload functionality more intuitive. The text now clearly explains the two ways users can upload files (drag-and-drop or click).


516-516: Added consistent styling for the "Add" button container.

The new plus_button class allows for consistent styling of the button container, aligning with the project's styling patterns and improving visual consistency.

src/features/AdminPage/AdminModal.styles.scss (6)

12-12: Removed unnecessary whitespace.

Whitespace removal improves code readability and maintainability.


28-29: Improved header typography with increased font weight.

Increasing the font weight from 500 to 600 makes headers more prominent and improves the visual hierarchy of the modal interface.


30-33: Added consistent header modal styling across the application.

The new .header_modal class with flex centering ensures consistent header styling across all admin modals, improving the overall design consistency.


42-45: Standardized form control focus states.

Setting a fixed width of 80% for focused form controls creates a consistent user experience, while removing box shadows prevents visual clutter.


55-56: Enhanced form input styling with subtle shadows and white background.

Adding a subtle box shadow and explicit white background improves the visual prominence of form fields, making them more distinguishable from the surrounding content.


73-86: Refined checkbox styling for better visual feedback.

The checkbox styling improvements create clearer visual feedback for checked states, using a red background with a white inset shadow that aligns with the application's color scheme.

src/features/AdminPage/PartnersPage/PartnerModal/PartnerModal.styles.scss (10)

11-12: Improved checkbox container layout.

Changing display from flex to inline-block creates a more appropriate container behavior for the checkboxes, allowing for better placement and alignment.


18-22: Enhanced label styling for better readability.

The font size adjustment and margin for checkbox labels improves readability and alignment, creating a more polished form appearance.


24-30: Standardized button styling and border colors.

The button styling ensures consistent appearance across the interface, with appropriate border colors that match the application's design system.


31-38: Adjusted dimensions for action buttons.

The precise sizing of the plus and close buttons creates a visually balanced interface with appropriate proportions for interactive elements.


39-47: Standardized form control heights for consistency.

Setting consistent heights for select elements and their inner components ensures proper alignment and prevents layout shifts when interacting with the form.


58-79: Enhanced file upload component styling.

The comprehensive styling for the upload component creates a clear, visually distinct area for file uploads with appropriate spacing, borders, and dimensions.


87-94: Improved textarea appearance and counter positioning.

The adjustments to textarea height and counter positioning ensure that character counts remain visible and properly aligned even as users type multi-line content.


100-113: Refined upload component with improved SVG and text layout.

The flex direction and precise sizing of SVG and text elements within the upload component create a more intuitive and visually appealing interface for users.


145-147: Removed unnecessary shadows from form items.

Eliminating box shadows with the !important flag ensures a clean, consistent appearance for form items without visual distractions.


179-188: Refined close button appearance with appropriate dimensions and colors.

The updated close button styling creates a more polished appearance with appropriate dimensions (40px height, 100px width) and colors that align with the application's design language.

Comment on lines +45 to +47
margin: auto;
padding: auto;
border-radius: 200px;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix invalid CSS property value

The button styling looks good overall, but padding: auto is not a valid CSS value. The auto value works for margins but not for padding properties.

.ant-form-item-control-input-content{
    .ant-btn{
    margin: auto;
-   padding: auto;
+   padding: 8px 16px; /* or another specific value that matches your design */
    border-radius: 200px;
}
}
🤖 Prompt for AI Agents
In src/features/AdminPage/TeamPage/TeamModal/TeamModal.styles.scss between lines
45 and 47, the CSS property 'padding' is incorrectly set to 'auto', which is
invalid. Replace 'padding: auto;' with a valid padding value such as a specific
length (e.g., 'padding: 10px;') or remove the padding property if not needed.

name="logotype"
label="Соціальна мережа"
rules={[{ required: true, message: 'Оберіть соц. мережу' }]}
rules={[{ required: false, message: 'Оберіть соц. мережу' }]}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify validator behavior with optional fields.

Making the social network selection and URL fields optional is a good UX improvement, but ensure the validator at lines 411-421 properly handles these now-optional fields.

Also applies to: 409-409


🏁 Script executed:

#!/bin/bash
# Check if the validator can handle null/undefined values for optional fields

# Search for validateSocialLink function definition
rg -A 10 "function validateSocialLink" --type=ts

Length of output: 1140


Ensure optional social link fields bypass validation

Since social network and URL are now optional, we need to skip format checks when the field is empty. Otherwise validateSocialLink will reject blank values.

• In src/features/AdminPage/TeamPage/TeamModal/TeamModal.component.tsx (around lines 394 & 409), update the rules validator to early-return on empty input:

 rules={[
-  { required: false, message: 'Оберіть соц. мережу' },
+  {
+    required: false,
+    validator: async (_, value) => {
+      if (!value) {
+        return Promise.resolve();
+      }
+      return validateSocialLink(
+        value,
+        socialOptions,
+        logoTypes,
+        sourceLinks,
+        socialName
+      );
+    },
+    message: 'Недійсний формат посилання',
+  },
 ]}

• In src/app/common/components/modals/validators/socialLinkValidator.tsx, add an early-exit for empty link:

export default async function validateSocialLink<T>(
  link: string,
  socialOptions: SocialItem<T>[],
  logoTypes: string[],
  sourceLinks: { logoType: T }[],
  socialName: string
): Promise<unknown> {
  if (!link) {
    return Promise.resolve();
  }
  if (isInvalidUrl(link)) {
    return Promise.reject(new Error('Недійсний формат посилання'));
  }
  // …rest of validation
}

These changes ensure truly optional fields won’t trigger a “Invalid format” error when left blank.

🤖 Prompt for AI Agents
In src/features/AdminPage/TeamPage/TeamModal/TeamModal.component.tsx around
lines 394 and 409, update the validation rules for the social network and URL
fields to allow empty values by adding an early return in the validator function
when the input is empty. Additionally, in
src/app/common/components/modals/validators/socialLinkValidator.tsx, modify the
validateSocialLink function to immediately resolve if the link is empty,
bypassing further format checks. This prevents validation errors on optional
fields left blank.

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.

1 participant