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

[Bug]: Incorrect title tooltip (Title: [Object Object]). #207

Closed
1 task done
techroy23 opened this issue May 12, 2024 · 1 comment
Closed
1 task done

[Bug]: Incorrect title tooltip (Title: [Object Object]). #207

techroy23 opened this issue May 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@techroy23
Copy link
Contributor

What went wrong?

Tooltip shows the word object instead of parsing it.

How'd you stumble upon it?

1.) Went to miruro.tv
2.) Drank coffee
3.) Hover on the title

image
image

What you hoped for vs. What actually happened

The truncated title should show up.

Anything else we should know?

I want to break free.

How can we reach you? (Totally Optional)

No response

Which version was acting up?

0.5.2

Which browsers were a bummer?

Chrome

Got logs?

No response

Code of Conduct Agreement

  • I agree to follow this project's Code of Conduct.
@techroy23
Copy link
Contributor Author

techroy23 commented May 12, 2024

May i suggest JSLibrary https://atomiks.github.io/tippyjs/

sample code (pyhon flask + html).
result is comming from the json response of consumet api.

<head>
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tippy.js/dist/tippy.min.css">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tippy.js@6.3.7/themes/translucent.min.css">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tippy.js@6.3.7/animations/shift-away.min.css">

	<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@popperjs/core/dist/umd/popper.min.js"></script>
	<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/tippy.js/dist/tippy.umd.min.js"></script>
</head>



<div class="container">
    <h1 class="text-center my-4">Popular Anime</h1>
    <div class="row">
        {% for result in data.results %}
        <div class="col-md-2 mb-4">
            <div class="card" data-tippy-content="{{ result.title }}">
                <img src="{{ result.image }}" alt="{{ result.title }}" class="card-img-top">
                <div class="card-body">
                    <h5 class="card-title">{{ result.title[:15] }}{% if result.title|length > 15 %}...{% endif %}</h5>
                    <p class="card-text">Release Date: {{ result.releaseDate }}</p>
                    <a href="{{ result.url }}" class="btn btn-primary">More Info</a>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
</div>

<script>
tippy('.card', {
    theme: 'translucent',
    animation: 'shift-away',
    followCursor: true,
    delay: 250
});
</script>

image

@techroy23 techroy23 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants