feat(library): Add customizable date format option for Library and History - #15898
Conversation
965eea1 to
a84520a
Compare
|
Thanks for the quick implementation! Besides that, it's not obvious that the format can be edited (not sure if that's what you referred to as bad UX?) Also, I'm struggling to understand the logic with the default, like what's the reasoning for If we go with a custom format, I suggest we add an enum class
Admittedly, dealing with the Custom item makes the TL;DR |
|
Thanks for this detailed discussion. I will look into it and take hints as to how to go ahead. |
Precisely yes!
Sounds good. Will implement it by the weekend, hopefully. |
Screen.Recording.2026-02-03.at.9.06.06.PM.mp4How does this look to you? (needs polishing, for instance the font box above is also changing which is unintentional. will push commits once i take care of it, just wanna if this looks promising.) |
|
Yeah, looks good! |
00b9ce9 to
6f83577
Compare
|
Did you get a chance to look at thi? @ronso0 (i feel u might have missed the notif) |
Didn't miss it, just kept this in my TODO as other stuff had higher prio (bug fixes and my own stuff) In general I'd appreciate the clang format fixes (is it auto-run on the entire file for you?) being a separate commit. And the date feature can be squashed into one commit IMHO. |
|
yeah, these clang format changes happen due to pre-commit. i will squash the commits as you said, before merge |
ronso0
left a comment
There was a problem hiding this comment.
mostly LGTM, see my prposal about the enum
| QVariant::fromValue( | ||
| static_cast<int>(BaseTrackTableModel::DateFormat::Native))); |
There was a problem hiding this comment.
since this is a Q_ENUM we don't need to cast to int and use
(at least this builds fine locally, let's see what the non-Ubuntu runners say)
| QVariant::fromValue( | |
| static_cast<int>(BaseTrackTableModel::DateFormat::Native))); | |
| QVariant::fromValue(BaseTrackTableModel::DateFormat::Native)); |
Likewise, in slotUpdate() we can use
int dateIndex = comboBox_dateFormat->findData(QVariant::fromValue(preset));
(there may be other occurences I overlooked)
|
While this works fine we now have two date variants:
I wonder what the best way forward is to sync both. |
how about we go ahead and write a dedicated function in /// Helper to format a QDateTime with a custom date format but using the system's
/// default locale for the time component.
/// This prevents the time from being dropped when the custom format is date-only.
inline QString formatDateTimeWithSystemTime(
const QDateTime& dt,
const QString& dateFormat = QString()) {
if (!dt.isValid()) {
return QString();
}
const QString dateStr = formatDate(dt.date(), dateFormat);
const QString timeStr = QLocale().toString(dt.time(), QLocale::ShortFormat);
return dateStr + QStringLiteral(" ") + timeStr;
}Just food for thought, as IMO this will make future changes (like changing the separator to I could open a new PR referencing this, once we get this merged. What say? |
23a54d8 to
0447c8d
Compare
I tried to squash the commits like you explained with this approach: But, it was kinda hectic and still not completely perfect. Am I missing something? |
|
The utility proposal sounds good!
You don't need to run precommit manually ( in case you did), most hooks are supposed to run on |
|
Oh wait, a .DS_store file slipped in, please remove. |
| m_pRateRangeDeck1(make_parented<ControlProxy>( | ||
| QStringLiteral("[Channel1]"), QStringLiteral("rateRange"), this)) { | ||
| setupUi(this); | ||
| gridLayout_track_table_view->setColumnStretch(1, 1); |
There was a problem hiding this comment.
when i was working on this feature, without this line, empty, unused gray space was present to the right of the other controls, instead of the controls expanding to fill the dialog width as expected. so i thought of having a belt and suspenders precaution at that moment. seems like this slipped to prod too.
removing it does absolutely nothing as .ui file does seem to be handling this well, thanks for pointing it out. i will go ahead and squash the change.
There was a problem hiding this comment.
ah okay. I think we can also put the format selector and the preview into a QHBoxLayout. will take a look later on
There was a problem hiding this comment.
I think we can also put the format selector and the preview into a QHBoxLayout.
That is the exact implementation that I went with, already.
There was a problem hiding this comment.
ah okay, didn't check.
then maybe we can adjust the sizepolicies so that the combobox has minimum width¹ and the preview can expand to move it to the left?
¹Minimum for the box and MinimumExpand for the label should work as the fixed date items are likely wider than any reasonable custom date string
There was a problem hiding this comment.
reasonable
:), well that is indeed true. but, i believe leaving it in the current form is also decent UX. up for discussion, as ur suggestion is totally reasonable.
d421555 to
55460ff
Compare
Yeah, I am aware of that. I was asking about cleaning up the commits. Initial commits were not clean as clang-formatting got coupled with code changes. So, i wanted to understand the contribution flow for such situations.
I will go ahead and open a PR, once this gets merged, to address that then. You can then review the final code changes there. |
|
Loks good except one issue: This fixes it for me |
55460ff to
e9f35e9
Compare
Thanks for testing the feature so well <3. |
|
Nice, let's go. |
|
Oh oh, looks like we broke something with the last fixup:
I'll prepare a fixup.. |
|
@xARSENICx can you take a look? |
|
Am so sorry @ronso0 , I informed in Zulip that I won't be able to contribute during this week. Is there any way this could wait till the 2nd of March? |
|
The changes look fine to me; I was unaware of the breakage. If the fixup works for you then please feel free to merge- I have no means to test it immediately. I will try to get back to this ASAP though- but if it fixes things for now, then we should move forward with it. |
Oh sorry, forgot about that. Good luck with your exams! |


This commit introduces a user preference to customize how dates are displayed across the Mixxx library and history views. It addresses the request for ISO 8601 compliance and allows completely custom date strings.
Key Changes:
Library Preferences UI:
ddd dd/MM/yyyy) directly into the combobox.Backend Integration:
BaseTrackTableModelnow holds a static global date format string, ensuring all Library and History views update dynamically without a restart.mixxx.cfgunder[Library], DateFormat.UI Layout Fixes:
QGridLayoutcolumn stretch factors to ensure a consistent, full-width appearance for all preference rows.Screen.Recording.2026-02-04.at.12.49.55.AM.mov
Fixes #15327