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: new lesson chip #4531

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: new lesson chip #4531

wants to merge 1 commit into from

Conversation

01zulfi
Copy link
Member

@01zulfi 01zulfi commented May 15, 2024

Because

testing if adding a lesson chip is viable

This PR

adds "new" lesson chip

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this PR follows the keyword: brief description of change format, using one of the following keywords:
    • Feature - adds new or amends existing user-facing behavior
    • Chore - changes that have no user-facing value, refactors, dependency bumps, etc
    • Fix - bug fixes
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • I have verified all tests and linters pass after making these changes.
  • If this PR addresses an open issue, it is linked in the Issue section
  • If applicable, this PR includes new or updated automated tests

@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-4531 May 15, 2024 12:30 Inactive
@CouchofTomato
Copy link
Member

@01zulfi

Do you need anyone else to do anything with this mate?

@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-4531 May 15, 2024 16:44 Inactive
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-4531 May 15, 2024 16:45 Inactive
@01zulfi
Copy link
Member Author

01zulfi commented May 15, 2024

@CouchofTomato not sure, I can take this to completion. Will need help if there any other changes required

@01zulfi 01zulfi requested a review from KevinMulhern May 15, 2024 16:49
Copy link
Member

@KevinMulhern KevinMulhern 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 ace @01zulfi, nice work! Just a few small suggestions from me.

One problem we'll have, is every lesson will be marked as "new" on fresh installations of the app locally and on review apps. But I'm not sure if that really is a problem, and I can't think of a reasonable way around it. We might just have to document it if contributors are confused by it.

app/models/lesson.rb Outdated Show resolved Hide resolved
app/models/lesson.rb Outdated Show resolved Hide resolved
app/models/lesson.rb Outdated Show resolved Hide resolved
@01zulfi 01zulfi requested a review from KevinMulhern May 19, 2024 13:42
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-4531 May 19, 2024 13:49 Inactive
spec/models/lesson_spec.rb Outdated Show resolved Hide resolved
spec/models/lesson_spec.rb Outdated Show resolved Hide resolved
@@ -20,6 +20,10 @@ class Lesson < ApplicationRecord

attribute :completed, :boolean, default: false

def recently_added?
created_at > 2.weeks.ago.beginning_of_day
Copy link
Member

Choose a reason for hiding this comment

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

beginning_of_day nice touch! 🤌

@01zulfi 01zulfi requested a review from KevinMulhern May 31, 2024 05:49
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-4531 May 31, 2024 05:58 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog / Ideas
Development

Successfully merging this pull request may close these issues.

None yet

3 participants