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

Feat/make it easier to display table names #876

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

prakha
Copy link
Contributor

@prakha prakha commented Mar 12, 2025

Issue

  • resolve:

Why is this change needed?

What would you like reviewers to focus on?

Testing Verification

What was done

🤖 Generated by PR Agent at 43ad3fc

  • Enhanced the TableNode component by adding tooltip functionality to display table names and refactored imports for consistency.
  • Simplified the TableHeader component by removing tooltip functionality and directly displaying table names.
  • Added type definitions for Next.js cache configurations, including support for custom caching profiles.
  • Added type definitions for CSS module classes in the CookieConsent component.
  • Introduced multiple vendor chunk files for OpenTelemetry instrumentation, including Fastify, Redis, and API logs, as well as other dependencies like module-details-from-path and has-flag.
  • Added a middleware build manifest configuration for defining polyfill files and build-related settings.

Detailed Changes

Relevant files
Documentation
2 files
cache-life.d.ts
Added type definitions for Next.js cache configurations. 

frontend/apps/erd-web/.next/types/cache-life.d.ts

  • Added type definitions for Next.js cache configurations.
  • Introduced unstable_cacheLife function with predefined profiles like
    "default", "seconds", "minutes", etc.
  • Included support for custom caching profiles with configurable stale,
    revalidate, and expire properties.
  • +141/-0 
    CookieConsent.module.css.d.ts
    Added type definitions for CookieConsent CSS module.         

    frontend/apps/erd-web/components/CookieConsent/CookieConsent.module.css.d.ts

  • Added type definitions for CSS module classes in the CookieConsent
    component.
  • Declared class names like button, content, controls, etc.
  • +11/-0   
    Enhancement
    2 files
    TableNode.tsx
    Enhanced TableNode component with tooltip for table names.

    frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableNode.tsx

  • Added tooltip functionality to display table names using
    TooltipProvider.
  • Integrated TooltipContent to show table name on hover.
  • Refactored imports for consistency with double quotes.
  • +48/-29 
    TableHeader.tsx
    Simplified TableHeader component by removing tooltip.       

    frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableHeader/TableHeader.tsx

  • Removed tooltip functionality from TableHeader.
  • Simplified the component by directly displaying the table name without
    a tooltip.
  • Refactored imports for consistency with double quotes.
  • +18/-29 
    Dependencies
    6 files
    @opentelemetry[email protected]_@[email protected]
    Added vendor chunk for OpenTelemetry Mongoose instrumentation.

    frontend/apps/erd-web/.next/server/vendor-chunks/@opentelemetry+instrumentation-mongoose@0.46.0_@opentelemetry[email protected]

  • Added vendor chunk file for OpenTelemetry Mongoose instrumentation.
  • Includes source mapping and module exports for OpenTelemetry
    integration.
  • +65/-0   
    [email protected]
    Added vendor chunk for module-details-from-path package. 

    frontend/apps/erd-web/.next/server/vendor-chunks/[email protected]

  • Added vendor chunk file for module-details-from-path package.
  • Provides functionality to extract module details from file paths.
  • +25/-0   
    @opentelemetry[email protected]_@[email protected]
    Add OpenTelemetry Fastify instrumentation vendor chunk.   

    frontend/apps/erd-web/.next/server/vendor-chunks/@opentelemetry+instrumentation-fastify@0.44.1_@opentelemetry[email protected]

  • Added a new vendor chunk file for
    @opentelemetry/instrumentation-fastify.
  • Includes multiple modules and utilities for OpenTelemetry
    instrumentation.
  • Implements functionality for tracing and span management in Fastify.
  • Contains autogenerated and source-mapped content for debugging.
  • +85/-0   
    [email protected]
    Add `has-flag` utility vendor chunk.                                         

    frontend/apps/erd-web/.next/server/vendor-chunks/[email protected]

  • Added a new vendor chunk file for has-flag.
  • Provides a utility function to check for flags in command-line
    arguments.
  • Includes source-mapped content for debugging.
  • +25/-0   
    @opentelemetry[email protected]
    Add OpenTelemetry API logs vendor chunk.                                 

    frontend/apps/erd-web/.next/server/vendor-chunks/@[email protected]

  • Added a new vendor chunk for OpenTelemetry API logs.
  • Includes various classes and methods for logging functionality, such
    as NoopLogger, ProxyLogger, and LogsAPI.
  • Provides utilities for managing global logger providers and
    compatibility checks.
  • +105/-0 
    @opentelemetry[email protected]
    Add OpenTelemetry Redis common vendor chunk.                         

    frontend/apps/erd-web/.next/server/vendor-chunks/@[email protected]

  • Added a new vendor chunk for OpenTelemetry Redis common utilities.
  • Introduced defaultDbStatementSerializer for serializing Redis commands
    based on predefined subsets.
  • Includes regex-based logic for command argument serialization.
  • +25/-0   
    Configuration changes
    1 files
    middleware-build-manifest.js
    Add middleware build manifest configuration.                         

    frontend/apps/erd-web/.next/server/middleware-build-manifest.js

  • Introduced a build manifest for middleware.
  • Defined polyfill files, dev files, and other build-related
    configurations.
  • Dynamically includes low-priority files based on the build ID.
  • +19/-0   
    Additional files
    91 files
    _events.json +1/-0     
    app-build-manifest.json +3/-0     
    build-manifest.json +17/-0   
    .rscinfo +1/-0     
    index.pack.gz.old [link]   
    index.pack.gz.old [link]   
    package-lock.json +668/-0 
    package.json +1/-0     
    react-loadable-manifest.json +1/-0     
    _instrument_sentry_server_config_ts.js +25/-0   
    app-paths-manifest.json +1/-0     
    edge-instrumentation.js +1943/-0
    edge-runtime-webpack.js +1146/-0
    instrumentation.js +438/-0 
    interception-route-rewrite-manifest.js +1/-0     
    middleware-manifest.json +6/-0     
    middleware-react-loadable-manifest.js +1/-0     
    next-font-manifest.js +1/-0     
    next-font-manifest.json +1/-0     
    pages-manifest.json +1/-0     
    server-reference-manifest.js +1/-0     
    server-reference-manifest.json +5/-0     
    633457081244afec._.hot-update.json +1/-0     
    @opentelemetry[email protected] +85/-0   
    @opentelemetry[email protected] +105/-0 
    @opentelemetry[email protected] +465/-0 
    @opentelemetry[email protected]_@[email protected] +55/-0   
    @opentelemetry[email protected]_@[email protected] +405/-0 
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +75/-0   
    @opentelemetry[email protected]_@[email protected] +55/-0   
    @opentelemetry[email protected]_@[email protected] +95/-0   
    @opentelemetry[email protected]_@[email protected] +75/-0   
    @opentelemetry[email protected]_@[email protected] +45/-0   
    @opentelemetry[email protected]_@[email protected] +105/-0 
    @opentelemetry[email protected]_@[email protected] +75/-0   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +75/-0   
    @opentelemetry[email protected]_@[email protected] +85/-0   
    @opentelemetry[email protected]_@[email protected] +45/-0   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] [link]   
    @opentelemetry[email protected]_@[email protected] [link]   
    @opentelemetry[email protected]_@[email protected] [link]   
    @opentelemetry[email protected]_@[email protected] [link]   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +65/-0   
    @opentelemetry[email protected]_@[email protected] +115/-0 
    @opentelemetry[email protected]_@[email protected] +115/-0 
    @opentelemetry[email protected]_@[email protected] +115/-0 
    @opentelemetry[email protected]_@[email protected] +255/-0 
    @opentelemetry[email protected]_@[email protected] +215/-0 
    @opentelemetry[email protected] +125/-0 
    @opentelemetry[email protected] +95/-0   
    @opentelemetry[email protected] +95/-0   
    @opentelemetry[email protected]_@[email protected] +25/-0   
    @prisma[email protected] +65/-0   
    @sentry[email protected] +1354/-0
    @sentry[email protected]_@[email protected]_@[email protected]_@o_z3s5mh66mawwnoh5pw4lqv5chy.js +324/-0 
    @sentry[email protected] +744/-0 
    @sentry[email protected]_@[email protected]_@[email protected]_wab2xbjb6maajk5mmcgtt34ivi.js +24/-0   
    @swc[email protected] +25/-0   
    [email protected] +25/-0   
    [email protected] +45/-0   
    [email protected] +44/-0   
    [email protected] +25/-0   
    [email protected] +54/-0   
    [email protected] +45/-0   
    [email protected] +35/-0   
    [email protected] +25/-0   
    [email protected] +34/-0   
    [email protected] +35/-0   
    [email protected] +24/-0   
    [email protected]_@[email protected]_@[email protected][email protected][email protected] +45/-0   
    [email protected] +25/-0   
    [email protected] +35/-0   
    [email protected] +117/-0 
    [email protected] +464/-0 
    [email protected] +25/-0   
    [email protected] +25/-0   
    [email protected] +25/-0   
    webpack-runtime.js +214/-0 
    polyfills.js +1/-0     
    _buildManifest.js +1/-0     
    _ssgManifest.js +1/-0     
    trace +4/-0     
    package.json +1/-0     
    prism.wasm [link]   

    Additional Notes


    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @prakha prakha requested a review from a team as a code owner March 12, 2025 20:30
    @prakha prakha requested review from hoshinotsuyoshi, FunamaYukina, junkisai, MH4GF and NoritakaIkeda and removed request for a team March 12, 2025 20:30
    Copy link

    changeset-bot bot commented Mar 12, 2025

    ⚠️ No Changeset found

    Latest commit: 95f7321

    Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

    This PR includes no changesets

    When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

    Click here to learn what changesets are, and how to add one.

    Click here if you're a maintainer who wants to add a changeset to this PR

    Copy link

    vercel bot commented Mar 12, 2025

    The latest updates on your projects. Learn more about Vercel for Git ↗︎

    3 Skipped Deployments
    Name Status Preview Comments Updated (UTC)
    test-liam-docs ⬜️ Ignored (Inspect) Mar 13, 2025 6:22pm
    test-liam-erd-sample ⬜️ Ignored (Inspect) Mar 13, 2025 6:22pm
    test-liam-erd-web ⬜️ Ignored (Inspect) Mar 13, 2025 6:22pm

    Copy link

    vercel bot commented Mar 12, 2025

    @prakha is attempting to deploy a commit to the ROUTE06 Core Team on Vercel.

    A member of the Team first needs to authorize it.

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Tooltip Implementation

    The TableNode component now wraps its content in a tooltip, but this might cause unexpected behavior if the table is large or if users need to interact with elements inside the table. Verify that the tooltip doesn't interfere with normal table interactions.

    <TooltipProvider>
      <TooltipRoot>
        <TooltipTrigger asChild>
          <div
            className={clsx(
              styles.wrapper,
              data.isHighlighted && styles.wrapperHighlighted,
              data.isActiveHighlighted && styles.wrapperActive
            )}
            data-erd={
              (data.isHighlighted || data.isActiveHighlighted) &&
              "table-node-highlighted"
            }
          >
            <TableHeader data={data} />
            {showMode === "ALL_FIELDS" && <TableColumnList data={data} />}
            {showMode === "KEY_ONLY" && (
              <TableColumnList data={data} filter="KEY_ONLY" />
            )}
          </div>
        </TooltipTrigger>
        <TooltipPortal>
          <TooltipContent side={"top"} sideOffset={4}>
            {data?.table?.name}
          </TooltipContent>
        </TooltipPortal>
      </TooltipRoot>
    </TooltipProvider>
    Removed Tooltip

    The tooltip functionality was removed from TableHeader and moved to the parent TableNode component. Ensure this doesn't create duplicate tooltips when both components are used together.

    <span className={styles.name}>{name}</span>

    Copy link
    Contributor

    qodo-merge-pro-for-open-source bot commented Mar 12, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Missing tooltip functionality

    The tooltip functionality has been removed from the TableHeader component but is
    now implemented at the TableNode level. This could lead to inconsistent behavior
    when users hover over table names in different contexts. Consider keeping the
    tooltip in both places or ensuring the parent component's tooltip covers all use
    cases.

    frontend/packages/erd-core/src/features/erd/components/ERDContent/components/TableNode/TableHeader/TableHeader.tsx [28-36]

     <div
       className={clsx(
         styles.wrapper,
         showMode === "TABLE_NAME" && styles.wrapperTableNameMode
       )}
     >
       <Table2 width={16} className={styles.tableIcon} />
     
    -  <span className={styles.name}>{name}</span>
    +  <TooltipProvider>
    +    <TooltipRoot>
    +      <TooltipTrigger asChild>
    +        <span className={styles.name}>{name}</span>
    +      </TooltipTrigger>
    +      <TooltipPortal>
    +        <TooltipContent side={"top"} sideOffset={4}>
    +          {name}
    +        </TooltipContent>
    +      </TooltipPortal>
    +    </TooltipRoot>
    +  </TooltipProvider>

    [To ensure code accuracy, apply this suggestion manually]

    Suggestion importance[1-10]: 8

    __

    Why: The suggestion correctly identifies that tooltip functionality was removed from TableHeader and moved to TableNode. This could cause inconsistent behavior in different contexts where the table name appears. Restoring the tooltip ensures consistent UX across the application.

    Medium
    • Update

    @MH4GF
    Copy link
    Member

    MH4GF commented Mar 13, 2025

    Hi @prakha, Can you check your changes? You seem to be committing .next directory.

    @junkisai
    Copy link
    Member

    junkisai commented Mar 13, 2025

    Since apps/erd-web has been renamed to apps/app, it seems necessary to incorporate the latest main branch.

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

    Successfully merging this pull request may close these issues.

    3 participants