Skip to content

Main bkp 8 march neumorphic#170

Open
sumansaurabh wants to merge 55 commits intomainfrom
main-bkp-8-march-neumorphic
Open

Main bkp 8 march neumorphic#170
sumansaurabh wants to merge 55 commits intomainfrom
main-bkp-8-march-neumorphic

Conversation

@sumansaurabh
Copy link
Contributor

@sumansaurabh sumansaurabh commented Mar 8, 2025

Description

  • This PR introduces a comprehensive neumorphic design overhaul across various components.
  • Enhancements include the addition of progress indicators, improved button styles, and refined modal presentations.
  • The dashboard and tutorial components have been updated for a more cohesive user experience.

Changes walkthrough 📝

Relevant files
Enhancement
DocumentationCard.tsx
Enhanced DocumentationCard with Neumorphic Design and Progress
Indicator

src/components/dashboard/DashboardTerminal/DocumentationCard.tsx

  • Added a ProgressIndicator component for visual progress
    representation.
  • Enhanced StyledBaseCard with neumorphic design and hover effects.
  • Improved styles for buttons and modal components.
  • +293/-44
    PlanCheckoutModal.tsx
    Refactored PlanCheckoutModal for Improved UI                         

    src/components/profile/profileCard/profileFormNav/nav/payments/paymentPricing/paymentPricingContent/planCheckoutModal/PlanCheckoutModal.tsx

  • Updated modal title to "Complete Your Purchase".
  • Refactored layout to use styled components for better styling.
  • Improved the presentation of pricing information.
  • +46/-74 
    DashboardContent.tsx
    Improved DashboardContent with Neumorphic Styles                 

    src/components/dashboard/DashboardContent/DashboardContent.tsx

  • Updated PremiumContainer styles for a neumorphic effect.
  • Integrated DashboardTerminal for enhanced dashboard functionality.
  • +25/-19 
    BaseButton.styles.ts
    Redesigned BaseButton with Neumorphic Styles                         

    src/components/common/BaseButton/BaseButton.styles.ts

  • Redesigned button styles for a neumorphic effect.
  • Added hover and active states for better user interaction.
  • +50/-103
    Tutorial.styles.tsx
    Added Neumorphic Styles to Tutorial Components                     

    src/components/tutorials/Tutorial.styles.tsx

  • Created styled components for tutorial tooltips and content.
  • Enhanced the appearance of tutorial elements.
  • +170/-0 

    💡 Penify usage:
    Comment /help on the PR to get a list of all available Penify tools and their descriptions

    sumansaurabh and others added 30 commits February 19, 2025 19:54
    * refactor(dashboard): clean up DashboardContent component by removing unused comments and adjusting styles
    
    * feat(sidebar): update sidebar navigation and rename dashboard to Git Repository
    
    * style(sider): update styles for MainSider and SiderMenu with new colors, shadows, and padding
    
    * style(sider): enhance styles for MainSider and SiderMenu with improved colors, shadows, and layout adjustments
    
    * style(sider): adjust margin for menu items in SiderMenu styles
    
    * style(header): enhance header styles with new action buttons and improved layout
    
    * style(breadcrumb): enhance MainBreadcrumb styles with improved layout, colors, and hover effects
    
    * style(layout): enhance MainLayout styles with new background, shadows, and responsive design adjustments
    
    * style(dashboard): enhance ListAllRepos and SearchDropdown styles with improved backgrounds, shadows, and hover effects
    
    * style(dashboard): update ListAllRepos styles with improved gradients and text shadow; adjust MainLayout background and height
    
    * style(dashboard): enhance premium card styles with new border, box-shadow, and gradient effects
    
    * style(buttons, dropdowns): enhance BaseButton and BaseDropdown styles with new gradients, shadows, and hover effects
    
    * style(dashboard): enhance PremiumContainer with new gradient, box-shadow, and hover effects; update DashboardTerminal to handle null repoDetails; adjust SearchDropdown styles for better usability
    
    * style(dashboard): update PremiumContainer background color; enhance DocumentationCard with neumorphic styles and hover effects; modify translation for documentation button
    
    * style(dashboard): update PremiumContainer box-shadow dynamically based on premium type; refactor DashboardTerminal to conditionally require premium access
    
    * style(VendorDropdown): add height to dropdown for improved layout consistency
    
    * style(BaseCard): implement neumorphic design with gradient background, shadows, and hover effects; adjust Ant Design overrides for consistency
    
    * style(BaseTable): implement dark-themed neumorphic design with gradient background and soft shadows; remove double borders from AntD table
    
    * style(ApiKeys): remove BaseCard wrapper from ApiKeyTable; add delete action column with button; adjust BaseTable styles to eliminate double borders
    
    * style(ApiKeysTable): add ActionRow component for improved action handling; enhance button styles and layout for better user experience
    
    * style(ApiKeysTable): comment out gradient background and shadow in ActionRowContainer; add gradient background for last column in BaseTable
    
    * style(BaseSwitch): update box-shadow and border color to use inputPlaceholder theme variable for consistency
    
    * style(ApiKeysTable, BaseTable): update inactive record text color for better visibility; adjust BaseTable text color for consistency
    
    * style(BaseFormItem): enhance dark theme styling with neumorphic design; adjust label and input colors for better contrast
    
    * style(PersonalInfo): add neumorphic design section for improved UI; update referral text for clarity
    
    * style(ConnectAccountItem): refactor styles for improved layout and responsiveness; reduce image size and adjust padding for better UI
    
    * style(ConnectAccountItem): refactor for improved layout and responsiveness; reduce image size and padding for better UI
    
    * style(PersonalInfo, ConnectAccountItems): refactor layout for improved responsiveness; enhance Neumorphic design and simplify component structure
    
    * style(SearchDropdown, MainLayout): adjust padding for improved layout and responsiveness
    
    * style(ConnectAccountItem): remove default padding from card body for improved layout
    
    * style(BaseFormItem, ConnectAccountItem): adjust font size for better readability; update box shadow for enhanced visual depth
    
    * style(ConnectAccountItem): adjust margin-top for IconWrapper; enable default padding removal in card body for improved layout
    
    * style(lightTheme): update heading color to improve contrast and readability
    
    * style(BaseCard): remove unnecessary comments and improve code clarity
    
    * style(ListAllRepos): add !important to padding for OuterBaseCard on xl screens
    
    * style(ListAllRepos): update OuterBaseCard background and box-shadow for improved aesthetics
    
    * style(Profile): enhance button and card styles with gradients and shadows for improved aesthetics
    
    * style(ProfileLayout): add gradient background and improve card styles for a cohesive dark theme
    
    * style(ProfileInfo): enhance avatar styles with neumorphism and improve text visibility for dark theme
    
    * style(SecuritySettings): add neumorphic card styles and refactor TwoFactorAuth component for improved UI
    
    * style(LoginForm): center align login title for improved aesthetics
    
    * style(SignUpForm): refactor form layout and center align terms of use checkbox for improved aesthetics
    
    * style(AuthForms): center align titles and update footer layout for improved aesthetics; add new login background image
    
    * refactor(ProfileNav): remove security settings navigation item for cleaner profile navigation
    
    * style(BaseFormItem): simplify success text display by removing dynamic content
    
    * style(SocialButton): enhance button design with neumorphic shadows and improved hover effects
    
    * style(SignUpForm): adjust font size for agreement and policy links for better readability
    
    * style(InnerBaseCard): enhance design with gradient background, improved shadows, and hover effects for a more modern look
    * feat(api): add updatedAt field to ApiTableRow and display in ApiKeysTable
    
    * feat(api): add updatedAt field to API table rows and adjust date formatting in ApiKeysTable
    
    * feat(api): add rowKey prop to ApiKeyTable for unique record identification
    
    * fix(App): ensure user profile reload only occurs when user is present
    
    * fix(api): correct wording in API key prompts for clarity
    
    * refactor(ApiKeyTable): simplify pagination handling and improve loading state management
    
    * fix(ActionRow): correct button label logic for activation state
    
    * refactor(MainLayout): remove fixed height from layout styles for better responsiveness
    
    * fix(ActionRow): correct button label and style logic for activation state
    
    * fix(BaseTable): update header background color for improved visibility
    
    * refactor(ApiKeys): remove unused import of BaseCard for cleaner code
    
    * feat(ProfileNav): add Payments History navigation and page component
    * fix(ActionRow): correct button label logic for activation state
    
    * fix(ActionRow): correct button label and style logic for activation state
    
    * refactor(Payments): update component structure and rename navigation label to 'Subscriptions'
    
    * fix(PaymentsTable): enhance pagination styles for better visibility and user experience
    
    * refactor(BaseTable): remove border-radius from container for consistent styling
    
    * refactor(PaymentHistory, PaymentPricing): integrate BaseButtonsForm for consistent button styling
    
    * fix(BaseDropdown): update getPopupContainer to use document.body for improved dropdown behavior
    
    * feat(Coupons): add neumorphic styling and restructure component layout for improved UI
    
    * refactor(sidebarNavigation): remove coupon section from sidebar navigation
    fix(UserIdItem): update label to indicate success state
    fix(translations): correct capitalization in security code messages
    
    * refactor(App): simplify user profile reload logic by removing unnecessary condition
    
    * refactor(SecurityCodeForm, BaseButton, AuthLayout): enhance button styling and layout for improved UI consistency
    
    * refactor(App, userSlice): streamline user profile fetching and improve modal styling
    
    * refactor(App, MainLayout, userSlice): optimize user profile fetching logic and enhance component structure
    
    * refactor(PaymentPricing): center CheckoutModal and adjust z-index for improved visibility
    
    * refactor(DashboardTerminal, DocumentationCard): invert premium access condition and add logging for doc generation trigger
    
    * refactor(DocumentationCard): enhance text color and button styling for improved UI aesthetics
    
    * refactor(DocumentationCard): update modal styling with gradients and improved button interactions
    
    * refactor(DocumentationCard): adjust button font sizes for consistency and clarity
    
    * refactor(DocumentationCard): improve modal layout and styling for better responsiveness and user experience
    
    * refactor(DocumentationCard): enhance button styling with neumorphic effects and improved hover/active states
    
    * refactor(DashboardTerminal): remove redundant card body styling for cleaner code
    
    * refactor(DocumentationCard): add progress indicator and pulsing animation for enhanced user feedback
    
    * refactor(PaymentPricing): enhance modal styling and animations for improved user experience
    …and adjust max-height for improved usability
    …g for buttons and update layout for improved user interaction
    …improved visual hierarchy and user experience
    …ns, layout, and styling for enhanced user experience
    …hance styling for better visibility and aesthetics
    …d improve hover effects for better user interaction
    feat(useLanguage): add console log for local language debugging
    @penify-dev penify-dev bot added enhancement New feature or request Review effort [1-5]: 4 labels Mar 8, 2025
    @penify-dev
    Copy link

    penify-dev bot commented Mar 8, 2025

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    4, because the PR introduces a significant design overhaul with numerous style changes across multiple components, requiring careful review to ensure consistency and functionality.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Potential UI Inconsistencies: With extensive style changes, there may be inconsistencies in the UI across different components that need to be checked.

    Performance Impact: The addition of multiple styled components and animations may impact performance, especially on lower-end devices.

    🔒 Security concerns

    No

    @penify-dev
    Copy link

    penify-dev bot commented Mar 8, 2025

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Clamp the progress value to ensure it stays within valid bounds

    Ensure that the progress prop passed to the ProgressOverlay component is clamped between 0
    and 100 to avoid unexpected behavior or rendering issues.

    src/components/dashboard/DashboardTerminal/DocumentationCard.tsx [547]

    -<ProgressOverlay progress={isStarted.percentage} />
    +<ProgressOverlay progress={Math.min(Math.max(isStarted.percentage, 0), 100)} />
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Remove or define the fetch dependency in the useEffect hook

    The fetch dependency in the useEffect hook is not defined; ensure that it is either
    defined or removed to avoid potential issues.

    src/components/apiKeys/apiKeysTable/ApiKeysTable.tsx [38]

    -}, [fetch]);
    +}, []);
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Enhancement
    Improve button labels for better clarity

    Consider using a more descriptive label for the buttons in the modal footer to improve
    clarity and user experience.

    src/components/dashboard/DashboardTerminal/DocumentationCard.tsx [586-588]

     <Button key="pro" type="primary" onClick={handleBuyPro} style={{ fontSize: '0.85rem' }}>
    -  Buy Pro(25$)
    +  Buy Pro Subscription ($25)
     </Button>
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Security
    Remove or replace console logging with a proper logging mechanism

    Ensure that the console.log statement is removed or replaced with a proper logging
    mechanism before deploying to production to avoid exposing sensitive information.

    src/components/dashboard/DashboardTerminal/DocumentationCard.tsx [428]

    -console.log('triggerDocStringGen', requiresPremiumAccess);
    +// Replace with proper logging mechanism
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Possible bug
    Add a check for undefined to prevent potential runtime errors

    Consider adding a check to ensure that requiresPremiumAccess is defined before using it in
    the triggerDocStringGen function to prevent potential runtime errors.

    src/components/dashboard/DashboardTerminal/DocumentationCard.tsx [429]

    -if (requiresPremiumAccess) {
    +if (typeof requiresPremiumAccess !== 'undefined' && requiresPremiumAccess) {
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Add a check for empty repoList to prevent runtime errors

    Ensure that the filteredRepoList correctly handles cases where repoList is empty to avoid
    potential runtime errors.

    src/components/profile/profileCard/profileFormNav/nav/payments/paymentPricing/paymentPricingContent/planCheckoutModal/selectReposDropdown/SelectReposDropdown.tsx [182-186]

    -const filteredRepoList = repoList.filter(option => 
    +const filteredRepoList = repoList.length > 0 ? repoList.filter(option => 
       `${option.organization_name}/${option.repo_name}`
         .toLowerCase()
         .includes(searchText.toLowerCase())
    -);
    +) : [];
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Ensure the onCheckboxChange function is defined before usage to prevent errors

    Ensure that the onCheckboxChange function is defined to avoid reference errors when the
    checkbox is interacted with.

    src/components/profile/profileCard/profileFormNav/nav/payments/paymentPricingContent/planCheckoutModal/selectReposDropdown/SelectReposDropdown.tsx [211-213]

     <StyledCheckbox
    -  onChange={(e) => onCheckboxChange(e, option.id?.toString() || '')}
    +  onChange={(e) => onCheckboxChange ? onCheckboxChange(e, option.id?.toString() || '') : null}
       checked={checkedItems.includes(option.id?.toString() || '')}
     >
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Add a null check for searchText to prevent potential runtime errors

    Consider adding a check to ensure that searchText is not null or undefined before using it
    in the filter function.

    src/components/profile/profileCard/profileFormNav/nav/payments/paymentPricingContent/planCheckoutModal/selectReposDropdown/SelectReposDropdown.tsx [185]

    -.includes(searchText.toLowerCase())
    +.includes(searchText?.toLowerCase() || '')
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Add error handling for the API data fetching process

    Ensure that the fetchData function handles errors from the API call to prevent unhandled
    promise rejections and to provide feedback to the user in case of failure.

    src/components/apiKeys/apiKeysTable/ApiKeysTable.tsx [29-33]

    -getApiTableData().then((res) => {
    -  if (isMounted.current) {
    -    setTableData({ data: res.data, loading: false });
    -  }
    -});
    +getApiTableData()
    +  .then((res) => {
    +    if (isMounted.current) {
    +      setTableData({ data: res.data, loading: false });
    +    }
    +  })
    +  .catch((error) => {
    +    notification.error({ message: t('apiTable.fetchError'), description: error.message });
    +    setTableData((prev) => ({ ...prev, loading: false }));
    +  });
     
    Suggestion importance[1-10]: 7

    Why:

    7
    User experience
    Improve visual feedback for hover and active states of cards for better user experience

    Ensure that the hover and active states for the cards are visually distinct to improve
    user experience.

    src/components/dashboard/DashboardList/ListAllRepos/ListAllRepos.Styles.ts [98-109]

     &:hover {
       opacity: 1;
    +  box-shadow: 
    +    12px 12px 28px rgba(0, 0, 0, 0.65),
    +    -12px -12px 28px rgba(60, 60, 60, 0.06);
     }
     &:active {
    -  transform: scale(0.98);
    +  transform: scale(0.95);
       box-shadow: 
    -    inset 10px 10px 20px rgba(0, 0, 0, 0.5),
    -    inset -10px -10px 20px rgba(60, 60, 60, 0.05);
    +    inset 8px 8px 16px rgba(0, 0, 0, 0.5),
    +    inset -8px -8px 16px rgba(60, 60, 60, 0.05);
     }
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Add hover styles to input fields for improved user interaction

    Consider adding hover styles for the input fields to enhance user experience and
    interactivity.

    src/components/common/forms/components/BaseFormItem/BaseFormItem.ts [39-41]

    +&:hover {
    +  box-shadow: 0 0 5px ${({ theme }) => theme.hoverShadow};
    +}
     &:focus {
       outline: none;
       box-shadow:
         inset 2px 2px 5px #1c1c1c,
         inset -3px -3px 5px #444444,
         0 0 2px 1px #00509a; /* or your brand’s primary color */
     }
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Best practice
    Validate the rowId in the handleToggleRow function before proceeding

    The handleToggleRow function should validate the rowId before calling toggleApiToken to
    ensure it is a valid ID.

    src/components/apiKeys/apiKeysTable/ApiKeysTable.tsx [60-64]

    -if (rowId === -1) {
    +if (rowId === -1 || typeof rowId !== 'number') {
       handleCreateRow();
       return;
     }
     toggleApiToken(rowId)
       .then((resp) => {
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Maintainability
    Rename the fetchData function to improve clarity

    Consider using a more descriptive name for the fetchData function to better convey its
    purpose, such as fetchApiTableData.

    src/components/apiKeys/apiKeysTable/ApiKeysTable.tsx [26]

    -const fetchData = useCallback(() => {
    +const fetchApiTableData = useCallback(() => {
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Use theme colors for better consistency in styling

    Consider using theme colors for the background and text instead of hardcoded values to
    maintain consistency across your application.

    src/components/common/forms/components/BaseFormItem/BaseFormItem.ts [13-30]

    -background: #2f2f2f;
    -color: #ffffff;
    +background: ${({ theme }) => theme.background};
    +color: ${({ theme }) => theme.textColor};
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Define box-shadow values in the theme for consistency and easier adjustments

    Ensure that the box-shadow values are defined in the theme to allow for easier adjustments
    and consistency.

    src/components/common/forms/components/BaseFormItem/BaseFormItem.ts [34-36]

     box-shadow:
    -  inset 2px 2px 5px #1c1c1c,
    -  inset -3px -3px 5px #444444;
    +  inset 2px 2px 5px ${({ theme }) => theme.shadowDark},
    +  inset -3px -3px 5px ${({ theme }) => theme.shadowLight};
     
    Suggestion importance[1-10]: 7

    Why:

    7
    Accessibility
    Improve accessibility for the success indicator by adding an aria-label

    Ensure that the success indicator is accessible by providing an aria-label or role
    attribute.

    src/components/common/forms/components/BaseFormItem/BaseFormItem.ts [77-78]

     content: '✓';
    +aria-label: 'Success';
     
    Suggestion importance[1-10]: 7

    Why:

    7

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

    Labels

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    1 participant