-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
### Display Name Formatter ✍️ #1340
base: main
Are you sure you want to change the base?
Conversation
Allows to customize transaction display name on the screen with transactions list. Could be useful to map long paths into short display names for reading convenience. Providing null values will fallback to default display name. Please note, that new formatter will take place only after transactions list screen start/restart. ```kotlin Chucker.setHttpTransactionNameFormatter { transaction -> // provide CharSequence that acts as custom display name of transaction } ```
Thanks for sending this over @NickMelnykIronvest Not sure if you saw my message here: #1339 (comment) This is not doing what I've suggested. Specifically I don't think we should add this capability to the |
@cortinico
@cortinico I do not see why. Assume you indeed agree to add ability to format (modify) transaction display name, what better place you would choose to set/store this interface. Just tell me straight, whether I could expect it merged and published anytime soon or request will be discarded (so I have to figure out other way how to use this feature in my project). If you need me to fix anyting before PR is accepted, let me know. |
Oh I understand your use case. You want to alter the visualization of the URL only on the transaction list. That's something we shouldn't be merging then as I think it's a bit too niche and specific to your use case. As a side note, you can always override the layout of the transaction list by providing new XML resource files that override Chuckers so you could have a multiline string in the transaction list. |
Allows to customize transaction display name on the screen with transactions list. Could be useful to map long paths into short display names for reading convenience. Providing null values will fallback to default display name. Please note, that new formatter will take place only after transactions list screen start/restart.
📄 Context
Optional Transaction Display Name Formatter
Display Name Formatter
📝 Changes
🚫 Breaking
Non breaking changes.
🛠️ How to test
Set any custom formatter as shown below and test null and non null values.
Null values fallback to default display name.
⏱️ Next steps
No plans. Potentially interface could be extended to also support custom display name in push-notifications.