python / python/pythondotorg

Duplicate scheduled year for single day events whose scheduled year is rendered

Open
#2,626 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.7k
Forks
700
Avg merge
2d 13h
Merged PRs (30d)
11

Description

Describe the bug

What

For single day events (events that start and end on the same day) that require year string to be displayed [which are]:

  • Single day events scheduled for a future year
  • Single day events that have passed rendered at the "You just missed..." section of the main events page {pythondotorg url}/events/

The year string is rendered multiple times.

Here are a couple of examples

1. Past event scenario

image

2. Future event scenario

image

To Reproduce
  • Set up a single day event scheduled to start in the future year or scheduled in the past (e.g. event has just been concluded)
  • Navigate to the main events page (http://localhost:8000/events) and observe the year string rendered multiple times.
Expected behavior
  • Single day events (regardless of schedule year) should only render a single year string (if necessary) since the event is guaranteed to start and end within the same year.
Addressing "If necessary"
  • Future single day event scheduled within the current year does not need to render the current year as there is no date/year ambiguity.
  • Past single day events (Events just missed) would need to render the year string dispelling any ambiguity on year event took place.
URL to the issue

No response

Screenshots

No response

Browsers

Firefox, Chrome, Safari, Microsoft Edge, Other

Operating System

Linux

Browser Version

No response

Relevant log output

No response

Additional context

I've traced down the offending template logic:
https://github.com/python/pythondotorg/blob/1bfeace44973dff8310f695ca15b40c277047cc7/templates/events/includes/time_tag.html#L1-L9

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with templates/events/includes/time_tag.html, which the issue identifies as containing the offending template logic, and reproduce the case on the main events page with a single-day event in a future or past year. Done means each affected event renders at most one year string, with the current year omitted when it is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.