Skip to content
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

feat(preview): custom title #1563

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joaomendoncaa
Copy link

@joaomendoncaa joaomendoncaa commented Sep 17, 2024

This is a functioning PR to close #1562.

This adds the optionality of a custom title string in the toggle_preview mapping. There's the potential to improve it with a lambda (instead of limiting to only a custom string), but as a start, it already suffices my personal needs.

  1. It doesn't break anything
  2. It adds an util to traverse nested tables and find a table with a specific value in it
  3. It removes an hardcoded value (preview's title nui popup)
  4. It fixes a personal health issue

...is that enough to sell it? 😅

I'd be happy to ear any considerations/requests for improvement, happy to help. Feel free to ask any questions.

I noticed there were tests, but if I understood correctly, it's out of scope to unit test the util.table_find_by_value I added.

Thank you for your time in advance to whoever takes a look at this PR. 🍻

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.

FEATURE: Custom preview title
1 participant