MessageBreadcrumbMixin never runs

Open Beginner friendly
#290 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start in services/email/message/views.py around MessageBreadcrumbMixin.get_breadcrumbs at lines 91-94 and inspect the base order for MessageDetailView and OrganizationScopedView. Resolve the MRO so the message breadcrumb implementation is reached, then verify that a message detail page begins its breadcrumb trail with the subject rather than the object string.

Written by the indexing model from the issue text.

Description

MessageBreadcrumbMixin.get_breadcrumbs cannot run: OrganizationScopedView inherits BreadcrumbViewMixin and precedes the mixin in MessageDetailView's bases, so the MRO resolves get_breadcrumbs to the base class. The message-subject breadcrumb therefore never renders, and coverage cannot reach the override.

Found by testJoe during the lazyJoe pass on PR #289 (codingjoe-move-graphs-to-message-lists).

side quest: MessageBreadcrumbMixin.get_breadcrumbs (services/email/message/views.py:91-94) can never run: BreadcrumbViewMixin precedes it in the MRO, so MessageDetailView.get_breadcrumbs resolves to the base and the message-subject breadcrumb never renders; coverage cannot reach it. [services/email/message/views.py]

Options: put the mixin first in the bases so it wins the MRO, or move the subject title into the mixin that already renders. Either way, the breadcrumb trail on a message detail page should start with the subject instead of the object string.

Dominant language
Python
Stars
4
Forks
0
Avg merge
7h 28m
Merged PRs (30d)
135

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.

More from codingjoe/relay

All issues in codingjoe/relay

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.