Skip to content

fix: correct dashboard title fallback and date filter widget defaults#195

Merged
MartinCervenkaSB merged 1 commit into
mainfrom
fix_dashboard_title_and_date_filter_widget
Jun 30, 2026
Merged

fix: correct dashboard title fallback and date filter widget defaults#195
MartinCervenkaSB merged 1 commit into
mainfrom
fix_dashboard_title_and_date_filter_widget

Conversation

@ViktorBojda

Copy link
Copy Markdown
Contributor

Preserve class-level dashboard title when none is passed to init, call get_default_label() instead of get_default_value() in DateFilterWidget, and accept tuples as date ranges in get_value_from_date_or_range().

Preserve class-level dashboard title when none is passed to __init__,
call get_default_label() instead of get_default_value() in DateFilterWidget,
and accept tuples as date ranges in get_value_from_date_or_range().
@ViktorBojda ViktorBojda requested a review from mihalikv June 29, 2026 13:11
@ViktorBojda ViktorBojda self-assigned this Jun 29, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38fecd8fa4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

super().__init__()
self.widgets = widgets or self.widgets or []
self.title = title
self.title = title or self.title

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the project-name fallback for untitled dashboards

When SBAdminDashboardView() is instantiated without an explicit title, super().__init__() has already populated self.title from the inherited label ("Dashboard"), so title or self.title is never falsy. This bypasses the existing get_title() fallback to settings.PROJECT_NAME, meaning dashboards that omitted title now render the generic Dashboard heading instead of the project name; the fallback needs to distinguish a real class-level title from the base label default.

Useful? React with 👍 / 👎.

@MartinCervenkaSB MartinCervenkaSB merged commit ab61539 into main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants