feature-sliced / documentation

🍰 Architectural methodology for frontend projects
https://feature-sliced.design
MIT License
1.5k stars 159 forks source link

Add vk-audiopad example #643

Closed vissh closed 10 months ago

vissh commented 10 months ago

Background

I have developed an extension using FSD architecture, I think my example and solutions will be useful. The code is located at /packages/front.

Changelog

Added in /pages/examples/img/vkaudiopad.png Added in /pages/examples/_config.ts

netlify[bot] commented 10 months ago

Deploy Preview for pr-fsd ready!

Name Link
Latest commit db161ca1c863c40c9f5f0d0a8ef310ee05a2cc97
Latest deploy log https://app.netlify.com/sites/pr-fsd/deploys/6562240f4fee5d000802339d
Deploy Preview https://deploy-preview-643--pr-fsd.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

vissh commented 10 months ago

@illright hi! Thank you for review, it has allowed me to look at my structure differently and I can now clearly see why you had questions about it.

card is as much a business entity as track and album, it's a variation of another playlist card, I've renamed it recommended-playlist.

About snackbar and content-tab I agree, they don't look like business entities. Instead of snackbar I chose the name notification, content-tab partially moved to widgets/navigation and created the active-tab entity.

Looking at everything again, I removed the controls entity because it's not a business entity at all, but parts of several features.

vissh commented 10 months ago

Thanks! Your comments were helpful and I feel like I now have a better understanding of FSD.

With active-tab, I was really confused because it knows too much, so I was leaving it in entities, but I realized that wasn't quite right, and I didn't like other options either. But after moving most of it to widgets yesterday and getting your comments today, moving it to shared doesn't seem so bad anymore. I think eventually I'll come back to this issue and maybe figure out a different way to interact with the tabs.

I moved the notification to shared, that's where it belongs :)