Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add featured course card component #294

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

kertuilves
Copy link

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from abf4123 to 97ad993 Compare July 10, 2023 12:44
@pawelkmpt
Copy link

pawelkmpt commented Jul 10, 2023

Did you branch it off feat/dashboard or master? It should be from feat/dashboard. We should see here just your commit with the component.

Copy link

@pawelkmpt pawelkmpt left a comment

Choose a reason for hiding this comment

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

Something is wrong on desktop. Please notice the white space below instructor

Screenshot 2023-07-10 at 14 54 56

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch 5 times, most recently from 2c6997f to 6e4a408 Compare July 10, 2023 16:54
@anoblet
Copy link
Collaborator

anoblet commented Jul 10, 2023

I believe we should be leveraging more of the benefits that custom elements provide us. Rather than defining the entire template as slotted content, I feel the template should be defined within the component and data passed in. We can be limited when the data is a list, generated html, or long content though other parts should be defined within the shadow dom. Ideally it would look like this:

<cxl-featured-course-card>
  <span slot="title">...</span>
  <span slot="tags">...</span>
  <div slot="description>...</div>
</cxl-featured-course-card>

This would allow us to scope CSS as much possible, as well as reduce the amount of data downloaded (the custom element would be responsible for rendering most of the HTML.)

@freudFlintstone
Copy link

freudFlintstone commented Jul 10, 2023

I believe we should be leveraging more of the benefits that custom elements provide us. Rather than defining the entire template as slotted content, I feel the template should be defined within the component and data passed in. We can be limited when the data is a list, generated html, or long content though other parts should be defined within the shadow dom. Ideally it would look like this:

<cxl-featured-course-card>
  <span slot="title">...</span>
  <span slot="tags">...</span>
  <div slot="description>...</div>
</cxl-featured-course-card>

This would allow us to scope CSS as much possible, as well as reduce the amount of data downloaded (the custom element would be responsible for rendering most of the HTML.)

Sorry for intruding a bit here. On top of @anoblet suggestions, which I agree with, this design is very, very similar to the cxl-course theme. And the lightweight card can easily be achieved by just hiding a couple sections from the other similar components.

My suggestion would be to briefly go over the figma designs marked as ready, and come up with a revised list of components that are each related to one clickup task and one pull request.

Consolidating design variations under the same component will probably avoid a lot of headaches in the future.

@pawelkmpt
Copy link

I believe we should be leveraging more of the benefits that custom elements provide us. Rather than defining the entire template as slotted content, I feel the template should be defined within the component and data passed in. We can be limited when the data is a list, generated html, or long content though other parts should be defined within the shadow dom. Ideally it would look like this:

<cxl-featured-course-card>
  <span slot="title">...</span>
  <span slot="tags">...</span>
  <div slot="description>...</div>
</cxl-featured-course-card>

This would allow us to scope CSS as much possible, as well as reduce the amount of data downloaded (the custom element would be responsible for rendering most of the HTML.)

I agree

Copy link

@pawelkmpt pawelkmpt left a comment

Choose a reason for hiding this comment

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

Similar conclusion as in #289 (comment)

TODO: create new cxl-featured-course component.

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from 6e4a408 to 3958587 Compare July 14, 2023 14:22
@kertuilves kertuilves requested a review from pawelkmpt July 14, 2023 14:22
@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch 5 times, most recently from 3958587 to 963d389 Compare July 14, 2023 14:36
Copy link

@pawelkmpt pawelkmpt left a comment

Choose a reason for hiding this comment

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

It needs tweaks on mobile caused by swoosh

Screenshot 2023-07-27 at 15 41 38 Screenshot 2023-07-27 at 15 41 44 Screenshot 2023-07-27 at 15 42 13

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from 963d389 to a8c072b Compare August 1, 2023 07:25
@kertuilves kertuilves requested a review from pawelkmpt August 1, 2023 07:25
Copy link

@pawelkmpt pawelkmpt left a comment

Choose a reason for hiding this comment

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

Looks a way better now, but still some resolutions have swoosh bug

Screenshot 2023-08-01 at 13 50 19

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from a8c072b to c9fead6 Compare August 1, 2023 13:16
@kertuilves kertuilves requested a review from pawelkmpt August 1, 2023 13:16
Copy link

@pawelkmpt pawelkmpt left a comment

Choose a reason for hiding this comment

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

Good job 👍
Next step: refactor to use cxlBaseCardElement

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from c9fead6 to 22e917d Compare August 2, 2023 11:25
@kertuilves kertuilves requested a review from pawelkmpt August 2, 2023 13:08
Copy link

@pawelkmpt pawelkmpt left a comment

Choose a reason for hiding this comment

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

This is looking good 👍

Slider on the wide screen has mall bug but I'm not sure if we ever use it this way:
Screenshot 2023-08-03 at 10 29 54

Fix if it's easy, skip if will take hours.

WRT base class improvements: we'll merge light card first, then you'll rebase this branch and we re-check it

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from 1e24a8d to ae84730 Compare August 7, 2023 09:45
@kertuilves kertuilves requested a review from pawelkmpt August 7, 2023 09:45
@pawelkmpt
Copy link

@kertuilves I just merged #289, please rebase this branch, then I'll do (final) review :)

@kertuilves kertuilves force-pushed the kertu/feat/featured-course-component branch from ae84730 to 1750577 Compare August 8, 2023 08:22
@pawelkmpt pawelkmpt merged commit f66f781 into feat/dashboard Aug 8, 2023
@pawelkmpt pawelkmpt deleted the kertu/feat/featured-course-component branch January 9, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants