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: [FC-0047] Relative Dates #505

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

IvanStepanok
Copy link
Contributor

@IvanStepanok IvanStepanok commented Jul 19, 2024

New Feature: Relative Date Display

The useRelativeDates functionality has been added to improve the readability of dates within the application. When this feature is enabled (default setting), dates within the range of -7 to +7 days from the current date will be displayed in a relative format (e.g., "just now," "2 days ago"). Dates outside this range will continue to be displayed in the traditional format. This setting can be toggled in the calendar synchronization settings.

Quick Demo

Screen.Recording.2024-07-19.at.11.26.47.mov

Environment for testing:

API_HOST_URL: 'https://axim-mobile.raccoongang.net'
ENVIRONMENT_DISPLAY_NAME: 'lms-axim-stage'
FEEDBACK_EMAIL_ADDRESS: '[email protected]'
OAUTH_CLIENT_ID: 'zP3vPz00c8fTRpYjNbVSlA1fxt9LnCxTM4JK1KQ0'
DISCOVERY:
    TYPE: "native"
    
FIREBASE:
    ENABLED: false

UI_COMPONENTS:
    COURSE_UNIT_PROGRESS_ENABLED: false
    COURSE_NESTED_LIST_ENABLED: false

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 19, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Jul 19, 2024

Thanks for the pull request, @IvanStepanok!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/openedx-mobile-maintainers. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@IvanStepanok IvanStepanok changed the title Feat: switching to relative dates Feat: [FC-0047] switching to relative dates Jul 19, 2024
@volodymyr-chekyrta volodymyr-chekyrta changed the title Feat: [FC-0047] switching to relative dates Feat: [FC-0047] Relative Dates Jul 23, 2024
@volodymyr-chekyrta volodymyr-chekyrta marked this pull request as ready for review July 23, 2024 11:58
@volodymyr-chekyrta volodymyr-chekyrta changed the title Feat: [FC-0047] Relative Dates feat: [FC-0047] Relative Dates Jul 23, 2024
@sdaitzman
Copy link

HI @IvanStepanok, this looks almost all good from the design side. For upcoming dates within the This Week section, relative dates should use the day of the week e.g. "Friday" instead of "in 4 days."

There are a lot of edge cases here, so I did my best to document them in the Figma file below the Dates section: https://www.figma.com/design/iZ56YMjbRMShCCDxqrqRrR/Open-edX-Mobile-App-All-Screens-v2.2?node-id=6703-32751&t=vxtbWParuRUmfgkZ-4

Here are the cases documented there for reference: Sections & date formats (items appear once, in the first case they meet)

  • “Completed” → all completed items
    • Current year: January 1
    • Before/after current year: January 1, 2010
  • “Past due” → items due before the current time
    • Due on yesterday’s date between 12:00AM and 11:59PM: Yesterday
    • Within last 7 days: 3 Days Ago
    • Current year: January 1
    • Before/after current year: January 1, 2010
  • “Today” → items due on the same calendar date i.e. before 11:59:59 PM
    • No date displayed
  • “This Week” → items due within 7*24 hrs from now
    • Due next date between 12:00AM and 11:59PM: Tomorrow
    • Due the same day of the week as today, but a week away: Next Monday
    • Otherwise: Monday
  • “Next week” → items due within 14*24hrs from now
    • January 1
  • “Upcoming” → all remaining items
    • Current year: January 1

@sdaitzman
Copy link

Hi @IvanStepanok, once the date handling has been updated to match the comment above/what @PavloNetrebchuk described on the Android version, I think this is all clear from the design side for now.

In the future, I think it's worth coming back to this and reconsidering how we approach dates/examining some edge cases, so I've created a new roadmap issue (#513) to track that future work.

@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Jul 30, 2024
@IvanStepanok
Copy link
Contributor Author

@salman2013 Thanks for your review; all feedback has been addressed.

Copy link

@salman2013 salman2013 left a comment

Choose a reason for hiding this comment

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

It looks good to me.

@volodymyr-chekyrta volodymyr-chekyrta merged commit a405dce into openedx:develop Aug 23, 2024
6 checks passed
@openedx-webhooks
Copy link

@IvanStepanok 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants