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

Fix part of #18384: Reusable carousel component for learner dashboard redesign #20306

Merged
merged 30 commits into from
Jun 11, 2024

Conversation

amyyeung17
Copy link
Collaborator

Overview

This PR addresses part of the 3rd breakpoint of #18384, adding a new reusable carousel component.

Includes 3 new files:

  • card-display.component.ts
  • card-display.component.spec.ts
  • card-display.component.html

Additional notes:

  • Will also be used for progress tab (view more instead of carousel)
  • The extra margin for one card (lessons in-progress) is noted as a to do for later on.
  • Placeholder data is used to demonstrate styling.

Essential Checklist

Please follow the instructions for making a code change.

  • I have linked the issue that this PR fixes in the "Development" section of the sidebar.
  • I have checked the "Files Changed" tab and confirmed that the changes are what I want to make.
  • I have written tests for my code.
  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes.
  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I can't assign them directly).

Proof that changes are correct

final-carousel.mov

@amyyeung17 amyyeung17 requested a review from a team as a code owner May 14, 2024 17:06
@amyyeung17 amyyeung17 requested a review from Nik-09 May 14, 2024 17:06
Copy link

oppiabot bot commented May 14, 2024

Assigning @Nik-09 for the first pass review of this PR. Thanks!

@amyyeung17 amyyeung17 changed the title Fix part of #18384: Reusable carousel for learner dashboard redesign Fix part of #18384: Reusable carousel component for learner dashboard redesign May 14, 2024
Copy link

oppiabot bot commented May 21, 2024

Hi @amyyeung17, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 4 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@Nik-09
Copy link
Member

Nik-09 commented May 25, 2024

Sorry @amyyeung17 for the delay. I will take a look tomorrow morning. Thank you

Copy link
Member

@Nik-09 Nik-09 left a comment

Choose a reason for hiding this comment

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

Thank you @amyyeung17 for the PR, I have added a few comments, PTAL.
Also sorry for the delayed review.
Thanks

@@ -41,6 +41,7 @@ export class LearnerTopicSummaryTileComponent implements OnInit {
thumbnailBgColor!: string;
openInNewWindow = false;
@Input() redesignFeatureFlag!: boolean;
@Input() last!: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

This is a very generic name, can you please help me to understand what does this mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. This is temporarily used for styling the last card; I haven't been able to figure out how to do this with only CSS.

@@ -34,6 +34,7 @@ import {StoryNode} from 'domain/story/story-node.model';
export class LessonCardComponent implements OnInit {
@Input() story!: StorySummary | LearnerExplorationSummary | CollectionSummary;
@Input() topic!: string;
@Input() last!: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Same as prev comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

import {downgradeComponent} from '@angular/upgrade/static';

@Component({
selector: 'card-display',
Copy link
Member

Choose a reason for hiding this comment

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

Can we make the selector name oppia-card-display to make the component consistent throughout the codebase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@Nik-09 Nik-09 assigned amyyeung17 and unassigned Nik-09 May 29, 2024
@Nik-09
Copy link
Member

Nik-09 commented Jun 3, 2024

Hi @amyyeung17 any update on this?

@amyyeung17
Copy link
Collaborator Author

@Nik-09 Hi, sorry for the delay. My computer's OS recently updated and somehow broke my setup. The program is unable to detect Python 2 installed in my computer, despite pyenv stating otherwise.

It runs fine in Docker. Unfortunately, I won't be able to push anything until this is resolved on my end.

@Nik-09
Copy link
Member

Nik-09 commented Jun 4, 2024

@Nik-09 Hi, sorry for the delay. My computer's OS recently updated and somehow broke my setup. The program is unable to detect Python 2 installed in my computer, despite pyenv stating otherwise.

It runs fine in Docker. Unfortunately, I won't be able to push anything until this is resolved on my end.

Hi @amyyeung17 Sorry to hear this, feel free to create a GitHub discussion if you need any help from the community regarding the setup.
Thanks

@amyyeung17
Copy link
Collaborator Author

@Nik-09 Hi, sorry for the delay. It took me some time to identify the cause of the issue, which was related to pyenv and Xcode.

Thanks for your patience!

@Nik-09
Copy link
Member

Nik-09 commented Jun 7, 2024

@Nik-09 Hi, sorry for the delay. It took me some time to identify the cause of the issue, which was related to pyenv and Xcode.

Thanks for your patience!

Thanks for the update, feel free to assign me once this PR is ready for review.

@amyyeung17 amyyeung17 assigned Nik-09 and unassigned amyyeung17 Jun 8, 2024
Copy link
Member

@Nik-09 Nik-09 left a comment

Choose a reason for hiding this comment

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

Thank you @amyyeung17; LGTM

@Nik-09 Nik-09 assigned amyyeung17 and unassigned Nik-09 Jun 10, 2024
@oppiabot oppiabot bot added the PR: LGTM label Jun 10, 2024
Copy link

oppiabot bot commented Jun 10, 2024

Hi @amyyeung17, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to ask someone to merge your PR once the CI checks pass and you're happy with it. Thanks!

@seanlip seanlip enabled auto-merge June 10, 2024 15:12
@seanlip seanlip added this pull request to the merge queue Jun 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 10, 2024
@seanlip seanlip added this pull request to the merge queue Jun 11, 2024
Merged via the queue into oppia:develop with commit 9cc8aab Jun 11, 2024
88 checks passed
AFZL210 pushed a commit to AFZL210/oppia that referenced this pull request Jun 12, 2024
…board redesign (oppia#20306)

* Added nav

Update with newest commits from PR 20185

* Updated margins

* Corrected shifts for card nav

* Updated shift

* Fixed nav spacing

* Added translation key

* Replaced explicit width with var cardWidth

* fixed margins and import errors

* Updated spacing between sections

* Changed width to include margin and added test cases

* Added card-display tests

* Refactored logic

* Refactored nextCard()

* Reverted testing statements to default

* Removed comments

* Updated TODO comments

* Replaced headings with i18n keys,font-awesome for nav buttons; added comments

* Renamed folder

* Updated view more button

* Updated styling for view more button

* Fixed capitalization of description and community text for cards

* Fixed lint errors, added copyright

* Updated lesson card test case

* Renamed variable

* Changed selector

* Updated variable names

* Removed extra file from prev commit
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.

None yet

3 participants