Skip to content

feat: implement color input type#24

Merged
SlimDeluxe merged 16 commits intoDataLinx:mainfrom
KilianTrunk:feat/color-input-type
Sep 19, 2025
Merged

feat: implement color input type#24
SlimDeluxe merged 16 commits intoDataLinx:mainfrom
KilianTrunk:feat/color-input-type

Conversation

@KilianTrunk
Copy link
Copy Markdown
Contributor

No description provided.

@KilianTrunk
Copy link
Copy Markdown
Contributor Author

This PR was built on top of #22, that's the reason there's so many commits - I guess best way to review is to just look at diff from 49449a4.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 47.77070% with 164 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.67%. Comparing base (91fde85) to head (6006f75).

Files with missing lines Patch % Lines
src/Filament/Resources/PropertyValueResource.php 32.21% 101 Missing ⚠️
src/Values/Background.php 78.57% 18 Missing ⚠️
...PropertyValueResource/Pages/ListPropertyValues.php 0.00% 10 Missing ⚠️
src/Enums/BackgroundType.php 0.00% 7 Missing ⚠️
src/Enums/GradientDirection.php 0.00% 7 Missing ⚠️
src/Casts/BackgroundCast.php 68.75% 5 Missing ⚠️
src/Enums/GradientStyle.php 0.00% 5 Missing ⚠️
src/Models/PropertyValue.php 68.75% 5 Missing ⚠️
src/Models/Property.php 72.72% 3 Missing ⚠️
src/Filament/Resources/ProductResource.php 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #24      +/-   ##
============================================
+ Coverage     32.63%   33.67%   +1.04%     
- Complexity     1232     1316      +84     
============================================
  Files            96      101       +5     
  Lines          5951     6218     +267     
============================================
+ Hits           1942     2094     +152     
- Misses         4009     4124     +115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SlimDeluxe
Copy link
Copy Markdown
Member

This one will need a manual merge 😐

Copy link
Copy Markdown
Member

@SlimDeluxe SlimDeluxe left a comment

Choose a reason for hiding this comment

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

  • When I try to create a new value, I get an SQL error
Image
  • I forgot to specify - for a "color" type property, multilang is always true
  • Move the color selector between Value and Info URL
  • The create/edit dialog is really slow and sluggish to interact with. Can you see why is it so? There are no significant queries being done, but it renders cca. 570 views just to open it (according to telescope). That's just crazy.

Comment thread resources/views/components/color-preview.blade.php Outdated
Comment thread src/Enums/BackgroundType.php
Comment thread src/Enums/GradientDirection.php
Comment thread src/Enums/GradientStyle.php
Comment thread src/Filament/Resources/PropertyValueResource/Pages/ListPropertyValues.php Outdated
Comment thread src/Values/Background.php Outdated
@KilianTrunk
Copy link
Copy Markdown
Contributor Author

@SlimDeluxe regarding telescope 570 views issue, not sure what to optimize in the edit/create modal regarding colors without breaking the live-preview functionality.

but apparently filament has full page re-render when modal action is triggered even though we just open the modal, found this unanswered discussion : filamentphp/filament#13833

I tested the telescope view issue with regular list property values and color values, and the difference wasn't that huge, so I guess it really is a filament issue? 🤷‍♂️

@KilianTrunk
Copy link
Copy Markdown
Contributor Author

p.s. make sure to run lando artisan filament:assets command after pulling since otherwise the live-preview won't render after moving css classes into the catalogue.css file

@SlimDeluxe
Copy link
Copy Markdown
Member

Ok, we can merge this regardless of the performance issues.
We can look into it after the upgrade to F4, if the issue remains. Hopefully not 😄

@SlimDeluxe SlimDeluxe merged commit 2b7cd34 into DataLinx:main Sep 19, 2025
6 checks passed
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.

3 participants