Skip to content

🔧 gallery detail properties tab#843

Open
roiLeo wants to merge 4 commits into
chaotic-art:mainfrom
roiLeo:fix/item/propertiesTable
Open

🔧 gallery detail properties tab#843
roiLeo wants to merge 4 commits into
chaotic-art:mainfrom
roiLeo:fix/item/propertiesTable

Conversation

@roiLeo
Copy link
Copy Markdown
Contributor

@roiLeo roiLeo commented Mar 10, 2026

  • fix table design
  • refactor code to component

before
Screenshot 2026-03-10 at 10-57-52 Polkadot Punks #14 Chaotic Labs

after
Screenshot 2026-03-10 at 10-57-46 Polkadot Punks #14 Chaotic

Summary by CodeRabbit

  • Refactor
    • Improved the token properties display in the gallery by restructuring how NFT attributes are rendered. The properties view now uses a dedicated component for better maintainability and consistency across the application.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2026

@roiLeo is attempting to deploy a commit to the Chaotic Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

The pull request refactors the properties display in the gallery interface by extracting a table-based properties view from GalleryAdditionalContent into a dedicated TokenProperties component. GalleryAdditionalContent removes inline property rendering logic and table configuration, while the new TokenProperties component encapsulates property data extraction and display with rarity computation.

Changes

Cohort / File(s) Summary
Properties Display Refactoring
app/components/gallery/GalleryAdditionalContent.client.vue
Removes TableColumn import, PropertyRow interface, and properties table rendering logic. Replaces inline properties display with TokenProperties component integration.
New Properties Component
app/components/gallery/TokenProperties.vue
New component that extracts and renders NFT token attributes as a properties table. Accepts tokenData and collectionId as props, computes rarity via useCollectionAttributes, and displays Trait, Value, and Rarity columns. Shows fallback message when no properties exist.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A hop, a skip, properties take flight,
From table sprawl to component light,
TokenProperties hops into place,
Rarity sparkles with newfound grace,
Gallery blooms in refactored delight! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using only 'gallery detail properties tab' with an emoji prefix, providing no specific information about the changeset's main improvements. Revise the title to clearly describe the main change, such as 'Refactor gallery properties to use TokenProperties component' or 'Fix gallery properties table design and extract to component'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
app/components/gallery/TokenProperties.vue (1)

1-1: Minor: Script tag attribute order differs from coding guidelines.

The coding guidelines specify <script setup lang="ts"> format.

Suggested fix
-<script lang="ts" setup>
+<script setup lang="ts">

As per coding guidelines: "Always use Composition API with <script setup lang="ts"> in Vue components"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/gallery/TokenProperties.vue` at line 1, The <script> tag in
TokenProperties.vue uses attributes in the wrong order; update the component's
top-level tag to use the Composition API style exactly as "<script setup
lang=\"ts\">", i.e., swap the attribute order so the "setup" keyword comes
immediately after "script" and "lang=\"ts\"" follows, ensuring the component
follows the project's Vue coding guideline for Composition API.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/components/gallery/TokenProperties.vue`:
- Line 1: The <script> tag in TokenProperties.vue uses attributes in the wrong
order; update the component's top-level tag to use the Composition API style
exactly as "<script setup lang=\"ts\">", i.e., swap the attribute order so the
"setup" keyword comes immediately after "script" and "lang=\"ts\"" follows,
ensuring the component follows the project's Vue coding guideline for
Composition API.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bec898cd-a81a-4824-8abf-18cdd3aae031

📥 Commits

Reviewing files that changed from the base of the PR and between ea80b42 and cc522c7.

📒 Files selected for processing (2)
  • app/components/gallery/GalleryAdditionalContent.client.vue
  • app/components/gallery/TokenProperties.vue

@hassnian
Copy link
Copy Markdown
Contributor

hi @roiLeo

sorry I missed your pr, a fix for this was already merged #855

can you sync with main so we don't override any changes

thanks

@roiLeo
Copy link
Copy Markdown
Contributor Author

roiLeo commented Mar 24, 2026

hi @roiLeo

sorry I missed your pr, a fix for this was already merged #855

can you sync with main so we don't override any changes

thanks

Should be good

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.

2 participants