Skip to content

Commit

Permalink
Review card subclass of BlogPost card (#1936)
Browse files Browse the repository at this point in the history
* add review card and sample data

* rating field

* user rating field

* review post styling

* update md content

* fix icon

* `review` embedded template and `rating-summary` atom template

* updates

* change review post content

* add article image

* use absolute url in query
  • Loading branch information
burieberry authored Dec 17, 2024
1 parent b7cfbfa commit bcfe08e
Show file tree
Hide file tree
Showing 20 changed files with 871 additions and 84 deletions.
1 change: 1 addition & 0 deletions packages/boxel-ui/addon/raw-icons/star-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/boxel-ui/addon/raw-icons/star-half-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/boxel-ui/addon/raw-icons/star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/boxel-ui/addon/src/icons.gts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ import Profile from './icons/profile.gts';
import Rows4 from './icons/rows-4.gts';
import Send from './icons/send.gts';
import Sparkle from './icons/sparkle.gts';
import Star from './icons/star.gts';
import StarFilled from './icons/star-filled.gts';
import StarHalfFill from './icons/star-half-fill.gts';
import SuccessBordered from './icons/success-bordered.gts';
import ThreeDotsHorizontal from './icons/three-dots-horizontal.gts';
import TriangleLeft from './icons/triangle-left.gts';
Expand Down Expand Up @@ -109,6 +112,9 @@ export const ALL_ICON_COMPONENTS = [
Rows4,
Send,
Sparkle,
Star,
StarFilled,
StarHalfFill,
SuccessBordered,
ThreeDotsHorizontal,
TriangleLeft,
Expand Down Expand Up @@ -167,6 +173,9 @@ export {
Rows4,
Send,
Sparkle,
Star,
StarFilled,
StarHalfFill,
SuccessBordered,
ThreeDotsHorizontal,
TriangleLeft,
Expand Down
25 changes: 25 additions & 0 deletions packages/boxel-ui/addon/src/icons/star-filled.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This file is auto-generated by 'pnpm rebuild:icons'
import type { TemplateOnlyComponent } from '@ember/component/template-only';

import type { Signature } from './types.ts';

const IconComponent: TemplateOnlyComponent<Signature> = <template>
<svg
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
fill='var(--icon-fill-color, currentColor)'
stroke='var(--icon-stroke-color, currentColor)'
stroke-linecap='round'
stroke-linejoin='round'
stroke-width='2'
viewBox='0 0 24 24'
...attributes
><path
d='m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'
/></svg>
</template>;

// @ts-expect-error this is the only way to set a name on a Template Only Component currently
IconComponent.name = 'StarFilled';
export default IconComponent;
27 changes: 27 additions & 0 deletions packages/boxel-ui/addon/src/icons/star-half-fill.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file is auto-generated by 'pnpm rebuild:icons'
import type { TemplateOnlyComponent } from '@ember/component/template-only';

import type { Signature } from './types.ts';

const IconComponent: TemplateOnlyComponent<Signature> = <template>
<svg
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
fill='var(--icon-fill-color, currentColor)'
stroke='var(--icon-stroke-color, currentColor)'
stroke-linecap='round'
stroke-linejoin='round'
stroke-width='2'
class='lucide lucide-star'
viewBox='0 0 24 24'
...attributes
><path d='M12 17.8 5.8 21 7 14.1 2 9.3l7-1L12 2' /><path
fill='none'
d='m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'
/></svg>
</template>;

// @ts-expect-error this is the only way to set a name on a Template Only Component currently
IconComponent.name = 'StarHalfFill';
export default IconComponent;
25 changes: 25 additions & 0 deletions packages/boxel-ui/addon/src/icons/star.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This file is auto-generated by 'pnpm rebuild:icons'
import type { TemplateOnlyComponent } from '@ember/component/template-only';

import type { Signature } from './types.ts';

const IconComponent: TemplateOnlyComponent<Signature> = <template>
<svg
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
fill='none'
stroke='var(--icon-stroke-color, currentColor)'
stroke-linecap='round'
stroke-linejoin='round'
stroke-width='2'
viewBox='0 0 24 24'
...attributes
><path
d='m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'
/></svg>
</template>;

// @ts-expect-error this is the only way to set a name on a Template Only Component currently
IconComponent.name = 'Star';
export default IconComponent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"data": {
"type": "card",
"attributes": {
"firstName": "Michael",
"lastName": "Anderson",
"bio": "Michael Anderson is an award-winning film critic and cultural commentator with over a decade of experience. He specializes in superhero and sci-fi genres, and is known for his insightful analysis of the Marvel Cinematic Universe. Michael hosts the popular podcast “Reel Talk” and contributes regularly to major publications. He holds a degree in Film Studies from USC and is passionate about fostering critical thinking in media consumption.",
"fullBio": "Michael Anderson isn’t just a film critic; he’s a cinematic explorer, navigating the vast universe of film with an insatiable curiosity and a keen eye for the extraordinary. With over a decade of experience, Michael has become a trusted voice in the world of cinema, particularly in the realms of superhero sagas and science fiction spectacles.\n\nBorn in the neon-lit streets of Los Angeles, Michael’s love affair with movies began in the flickering darkness of a small, family-owned theater. It was there, amidst the aroma of buttered popcorn and the whir of film reels, that he first glimpsed the power of storytelling through motion pictures. This childhood fascination evolved into a lifelong passion, eventually leading him to the hallowed halls of USC’s School of Cinematic Arts.\n\nMichael’s writing style is as dynamic as the films he critiques. He possesses a unique ability to dissect complex narratives and visual techniques, presenting them in a way that’s both intellectually stimulating and accessible to the average moviegoer. His reviews are not mere summaries, but thoughtful explorations of a film’s place in the broader cultural context.\n\nWhile Michael’s expertise spans all genres, he’s particularly renowned for his insightful analysis of the Marvel Cinematic Universe. His annual “State of the MCU” articles have become required reading for fans and industry insiders alike. Michael approaches each superhero film with the same reverence he would a Kurosawa classic, finding depth and nuance where others see mere popcorn entertainment.\n\nBeyond the written word, Michael has embraced the digital age of film criticism. His weekly podcast, “Reel Talk with Michael Anderson,” features in-depth discussions with filmmakers, actors, and fellow critics. He’s also not afraid to engage in spirited debates on social media, where his witty retorts and thoughtful arguments have earned him a devoted following.\n\nWhen he’s not in a dark theater or hunched over his laptop crafting his latest review, Michael can be found lecturing on film studies at his alma mater or mentoring the next generation of critics through his online workshop series. He believes passionately in the importance of critical thinking in media consumption and strives to foster this skill in others.\n\nAs the landscape of cinema continues to evolve, so too does Michael’s approach to criticism. He remains ever-vigilant, always ready to champion bold new voices in filmmaking or to challenge the industry when it falls short of its potential. For Michael Anderson, every frame is a world waiting to be explored, every film a journey worth taking.",
"quote": "“Cinema is not just entertainment; it’s a mirror reflecting the complexities of our world.”",
"contactLinks": [
{
"label": "Email",
"value": "[email protected]"
},
{
"label": "LinkedIn",
"value": "https://linkedin.com/michael-anderson-boxel"
},
{
"label": "X",
"value": "https://x.com/michael-anderson-boxel"
}
],
"email": "[email protected]",
"featuredImage": {
"imageUrl": "https://boxel-images.boxel.ai/app-assets/portraits/photo-1556474835-b0f3ac40d4d1.jpeg",
"credit": null,
"caption": null,
"altText": "Michael Anderson",
"size": "actual",
"height": null,
"width": null
},
"description": "Senior Film Critic & Cultural Commentator",
"thumbnailURL": "https://boxel-images.boxel.ai/app-assets/portraits/photo-1556474835-b0f3ac40d4d1.jpeg"
},
"relationships": {
"blog": {
"links": {
"self": "../ReviewBlog/583df6bb-5739-418a-9186-978bd72816c1"
}
}
},
"meta": {
"adoptsFrom": {
"module": "../author",
"name": "Author"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"data": {
"type": "card",
"attributes": {
"firstName": "Robert",
"lastName": "Fields",
"bio": "Robert Fields has over a decade of experience dissecting the evolving landscape of speculative cinema. Known for incisive commentary and a nuanced appreciation of narrative complexity, Fields’ insights have appeared in numerous niche publications and festival panels, shaping discussions on storytelling’s future frontiers.",
"fullBio": null,
"quote": null,
"contactLinks": [
{
"label": "Email",
"value": "[email protected]"
},
{
"label": "X",
"value": "https://www.x.com/robert-fields-boxel"
}
],
"email": "[email protected]",
"featuredImage": {
"imageUrl": "https://boxel-images.boxel.ai/app-assets/portraits/photo-1512485694743-9c9538b4e6e0.jpeg",
"credit": null,
"caption": null,
"altText": "Robert Fields",
"size": "actual",
"height": null,
"width": null
},
"description": "Senior Film Critic & Cultural Commentator",
"thumbnailURL": "https://boxel-images.boxel.ai/app-assets/portraits/photo-1512485694743-9c9538b4e6e0.jpeg"
},
"relationships": {
"blog": {
"links": {
"self": "../ReviewBlog/583df6bb-5739-418a-9186-978bd72816c1"
}
}
},
"meta": {
"adoptsFrom": {
"module": "../author",
"name": "Author"
}
}
}
}
19 changes: 19 additions & 0 deletions packages/experiments-realm/CatalogEntry/fields/rating-field.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"data": {
"type": "card",
"attributes": {
"title": "Rating Summary Field",
"isField": true,
"ref": {
"module": "../../ratings-summary",
"name": "RatingsSummary"
}
},
"meta": {
"adoptsFrom": {
"module": "https://cardstack.com/base/catalog-entry",
"name": "CatalogEntry"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"data": {
"type": "card",
"attributes": {
"rating": {
"average": 4.5,
"count": null,
"isEditable": false
},
"userRating": {
"average": null,
"count": null,
"isEditable": true
},
"headline": "Singularity’s Echo – A Mind-Bending Sci-Fi Masterpiece",
"slug": null,
"body": "### A Quantum Leap in Storytelling\n\nFrom the opening shot—an endless corridor of luminescent panels that seem to fold space inward—the universe as we know it begins to warp. Commander Rellis Dratan, standing at the threshold of the research vessel *Verion-9*, is more explorer than soldier. As the ship approaches a clandestine rift of shifting hues and spiraling matter, the narrative refuses to settle into familiar patterns. Instead, it delves deeper into philosophical quandaries, blurring the line between tangible reality and a realm where perception itself is fluid. The film’s bold use of non-linear timelines, mirrored dialogues, and subtle clues hidden in the corners of each frame invites viewers to participate in the mystery, rather than passively consume it.\n\n### Stellar Performances\n\nAt the core of *Singularity’s Echo* are performances as transcendent as the cosmos it portrays. Olivia Makerran’s portrayal of Commander Dratan is a masterclass in quiet strength, projecting a calm determination that anchors the audience amid the film’s swirling uncertainties. Devon Hallard as the ship’s taciturn navigator and Tessa Reidan as a brilliant but cautious physicist round out a trio of characters whose emotional interplay infuses the narrative with tension and warmth. Each of them conveys layers of humanity through subtle gestures—a hesitant glance, a tremor in the voice—that resonate long after the closing credits. Even the secondary cast, including Martin Cender as the skeptical technician and Lina Acosta as the empathic communications officer, never feel like afterthoughts. They enrich the ensemble with their own struggles and revelations, ensuring that every whisper aboard the *Verion-9* matters.\n\n### Visual and Auditory Spectacle\n\nVisually, *Singularity’s Echo* is a landmark achievement. Under the guidance of effects designer Cavel Junt, the film weaves together dynamic particle simulations, refracted light displays, and fluid gravitational distortions that challenge viewers’ sense of stability. The climactic traversal into the heart of the anomaly is a symphony of color and form: starfields shimmer, corridors twist, and perspectives shift as if the audience itself is being gently folded and unfolded within a cosmic hand. Complementing these sights is a score by Hirolo Vaard that might be best described as liquid sound—notes flow and merge, layering alien whispers with distant echoes, enveloping the audience in a gentle, hypnotic tide. Together, these technical feats forge an immersive environment where wonder coexists with unease, and every frame hums with potential.\n\n### Conclusion: A Triumphant Addition to the Sci-Fi Canon\n\nThough *Singularity’s Echo* occasionally wavers under the weight of its own ambition—some may find the pacing challenging, and a handful of narrative threads remain tantalizingly unresolved—these imperfections are trivial compared to the film’s broader achievements. This is a story that invites us to contemplate the fragility of understanding and the boundless expanse of possibility. In an age of safe sequels and predictable plots, *Singularity’s Echo* dares to push beyond known stars, offering a transformative cinematic experience that lingers in the mind and senses long after the projector’s glow fades. It stands as a testament to the power of imagination, ensuring that audiences will look to the cosmos with renewed curiosity, eagerly awaiting whatever astonishing horizon lies beyond.",
"publishDate": "2024-10-07T19:00:00.000Z",
"featuredImage": {
"imageUrl": "https://boxel-images.boxel.ai/app-assets/blog-posts/space-movie-thumb.jpeg",
"credit": null,
"caption": null,
"altText": "",
"size": "cover",
"height": 485,
"width": null
},
"description": "In an era hungry for originality, \"Singularity’s Echo\" emerges as a luminous beacon in the cosmic darkness—an audacious journey that redefines what viewers can expect from the genre. Directed by the elusive auteur Oruni Kilrain, this film harnesses the raw power of interstellar wonder and transforms it into a multilayered narrative tapestry. Blending heart-stirring drama with disorienting visuals, \"Singularity’s Echo* reminds us that true cinematic frontiers remain ripe for exploration, stretching beyond the gravitational pull of safe storytelling.",
"thumbnailURL": "https://boxel-images.boxel.ai/app-assets/blog-posts/space-movie-thumb.jpeg"
},
"relationships": {
"authorBio": {
"links": {
"self": "../Author/3a655a91-98b5-4f33-a071-b62d39218b33"
}
},
"blog": {
"links": {
"self": "../ReviewBlog/583df6bb-5739-418a-9186-978bd72816c1"
}
},
"editors": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../review",
"name": "Review"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"data": {
"type": "card",
"attributes": {
"website": "www.cinereview.com",
"title": "CineReview",
"description": null,
"thumbnailURL": null
},
"meta": {
"adoptsFrom": {
"module": "../review-blog",
"name": "ReviewBlog"
}
}
}
}
Loading

0 comments on commit bcfe08e

Please sign in to comment.