Skip to content

feat(cms): about page migration to payload#138

Draft
novruzoff wants to merge 14 commits into
masterfrom
init-payload-globals/about
Draft

feat(cms): about page migration to payload#138
novruzoff wants to merge 14 commits into
masterfrom
init-payload-globals/about

Conversation

@novruzoff

@novruzoff novruzoff commented Mar 29, 2025

Copy link
Copy Markdown
Member

Important

Migrates the 'About' page to Payload CMS, updating data models, database schema, and frontend components to fetch and display data from the CMS.

  • Behavior:
    • Migrates 'About' page to Payload CMS, fetching data using getPayloadClient() in page.tsx.
    • Displays error if groupPhoto is missing.
  • Components:
    • Inline TeamSection component in page.tsx.
    • Removes TeamSection.tsx.
  • Database:
    • Adds AboutPage global config in AboutPage.ts.
    • Creates migration scripts 20250228_031847_payload_about.ts and 20250228_031847_payload_about.json for new tables and enums.
  • Types:
    • Adds About and AboutSelect interfaces in payload-types.ts.
  • Config:
    • Registers AboutPage in payload.config.ts.

This description was created by Ellipsis for 2ca5fb0. It will automatically update as commits are pushed.

@novruzoff novruzoff self-assigned this Mar 29, 2025
@novruzoff novruzoff changed the title feat(cms): about page migrated to payload feat(cms): about page migration to payload Mar 29, 2025
@github-actions

This comment was marked as outdated.

ellipsis-dev[bot]

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

@novruzoff novruzoff added the enhancement New feature or request label Mar 29, 2025
@github-actions

This comment was marked as resolved.

ellipsis-dev[bot]

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

ellipsis-dev[bot]

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@ellipsis-dev ellipsis-dev Bot left a comment

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.

❌ Changes requested. Incremental review on 0e6725d in 2 minutes and 6 seconds

More details
  • Looked at 379 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 drafted comments based on config settings.
1. src/app/(app)/(pages)/about/page.tsx:63
  • Draft comment:
    Consider extracting the Payload client to a variable to avoid double-await, which improves readability.
  • Reason this comment was not posted:
    Confidence changes required: 66% <= threshold 70%
    None
2. src/app/(app)/(pages)/about/page.tsx:111
  • Draft comment:
    Avoid casting 'page' as 'any' for SEO; consider a safer type guard or default value structure.
  • Reason this comment was not posted:
    Confidence changes required: 66% <= threshold 70%
    None
3. src/globals/AboutPage.ts:31
  • Draft comment:
    Update of 'update' access from 'denyAccessField' to 'canEditContent' should be reviewed to ensure permission requirements are met.
  • Reason this comment was not posted:
    Confidence changes required: 66% <= threshold 70%
    None
4. src/globals/AboutPage.ts:40
  • Draft comment:
    Changing groupPhoto from required to optional is a design decision; double-check that this aligns with content requirements.
  • Reason this comment was not posted:
    Confidence changes required: 66% <= threshold 70%
    None
5. src/payload-types.ts:759
  • Draft comment:
    The updated type for groupPhoto now allows null; ensure this matches the API responses and frontend handling.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 70%
    The comment is asking the author to ensure that the change matches the API responses and frontend handling, which is against the rules. It doesn't provide a specific suggestion or ask for a specific test to be written.
6. src/app/(app)/(pages)/about/page.tsx:100
  • Draft comment:
    Consider using a unique identifier rather than the array index for the key in the team sections mapping.
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. src/app/(app)/(pages)/about/page.tsx:110
  • Draft comment:
    Avoid using an 'as any' cast in generateMetadata; consider proper typing for the 'page' object for better type safety.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 70%
    The 'as any' cast here is actually a deliberate choice with documented reasoning. Creating proper typing would require modifying the global schema or creating a separate interface just for this optional property. Given that there's a fallback value, the current approach is pragmatic and well-documented. The comment seems to be suggesting a "best practice" without considering the specific context.
    Perhaps there could be a more type-safe way to handle this, like extending the AboutContent interface or using a union type.
    While type safety is important, the current solution is intentional, documented, and handles an edge case appropriately without adding unnecessary complexity.
    Delete the comment. The use of 'as any' is intentional, documented, and serves a specific purpose in handling an optional property with a fallback value.
8. src/globals/AboutPage.ts:65
  • Draft comment:
    There appears to be a redundant '//' in the comment on line 65 (i.e., "// // From requested changes: fr support added"). Consider removing one of the slashes for clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. src/globals/AboutPage.ts:77
  • Draft comment:
    The language labels for content fields are inconsistent in their casing. For example, 'Page Title (EN)' uses uppercase whereas 'Introduction - En' (line 77) and 'Initiative Details - En' (line 96) use 'En' instead of 'EN'. Similarly, 'Introduction - Fr' (line 87) and 'Initiative Details - Fr' (line 106) should be 'FR' for consistency. Consider standardizing these labels for improved consistency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_YmDOaRIbCofJIjSx


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.


/* Hero image styling */
.heroImage {
@apply h-full w-full object-cover brightness-90 transition-transform duration-500 group-hover:scale-105 group-hover:brightness-100;

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.

The .heroImage class uses group-hover utilities. Ensure the parent (e.g., .heroImageWrapper) has a 'group' class if the hover effects are intended.

ellipsis-dev[bot]

This comment was marked as outdated.

@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as outdated.

@atlasgong atlasgong force-pushed the init-payload-globals/about branch from a956532 to 81da645 Compare May 27, 2025 20:35
@github-actions

Copy link
Copy Markdown

Commit messages do not follow conventional commit guidelines.

file:///home/runner/work/website/website/node_modules/@commitlint/cli/lib/cli.js:132
        throw err;
        ^

Error: fatal: Invalid revision range a956532831a7b0982c7acbe436acdd6104d7fbfa..81da645ca7451688ad30605225425a89bd099c6b

    at Transform.transform [as _transform] (/home/runner/work/website/website/node_modules/git-raw-commits/index.js:100:36)
    at Transform._write (node:internal/streams/transform:171:8)
    at writeOrBuffer (node:internal/streams/writable:572:12)
    at _write (node:internal/streams/writable:501:10)
    at Writable.write (node:internal/streams/writable:510:10)
    at Socket.ondata (node:internal/streams/readable:1009:22)
    at Socket.emit (node:events:530:35)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)

Node.js v22.15.0

Please see https://github.com/MindVista/website/wiki/Commit-Guidelines for more information.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants