Simple forum software for building great communities.
Go to file
David Wheatley f9e8424620
Add tooltip component (#2843)
* Add Tooltip component to common

Will be used to provide backwards compatibility when we switch to CSS tooltips.

All other methods of creating tooltips are deprecated and this component-based method should be used instead.

* Modify direct child instead of using container element

Instead of using a container to house the tooltip, we'll now modify the
first direct child of the Tooltip component.

The Tooltip component will ensure that:
- children are passed to it
- only one child is present
- that child is an actual HTML Element and not a text node, or similar
- that child is currently present in the DOM

Only after all of the above are satisfied, will the tooltip be created
on that element. We store a reference to the DOM node that the tooltip
should be created on, then use this to perform tooltip actions via
jQuery. If this element gets changes (e.g. the tooltip content is
updated to another element) then the tooltip will be recreated.

If any of the first 3 requirements are not satisfied, an error will
be thrown to alert the developer to their misuse of this component.

To make this work, we do need to overwrite the title attribute of
the element with the tooltip, but this is the only solution other than
specifying `title` as an option when making the tooltip, but this is
not accessible by screenreaders unless they simulate a hover on the
element.

* Add warning about component overwriting `title` attr

* Update previous uses of Tooltip component
2021-05-10 21:06:40 +01:00
.github Add option to build with Webpack Bundle Analyzer (#2708) 2021-04-10 15:00:48 +01:00
js Add tooltip component (#2843) 2021-05-10 21:06:40 +01:00
less Revamp notifications stylesheet (grid and flex) (#2822) 2021-05-02 17:13:04 +01:00
locale Update validation.yml. (#2829) 2021-05-03 19:47:18 -04:00
migrations Rename relevant migration so it runs again (#2793) 2021-04-19 14:14:07 -04:00
src Remove unused variable 2021-05-04 18:15:05 -04:00
tests Harden Headers (#2721) 2021-05-03 12:42:06 -04:00
views Switch to ICU MessageFormat (#2759) 2021-04-30 12:44:39 -04:00
.editorconfig Laravel components v8 (#2576) 2021-03-05 09:43:35 -05:00
.gitattributes Mark JS dist folder as generated code (#2828) 2021-05-04 18:13:42 +01:00
.gitignore Laravel components v8 (#2576) 2021-03-05 09:43:35 -05:00
.styleci.yml Drop the generate:migration command (#2686) 2021-03-16 12:41:07 -04:00
CHANGELOG.md Release v0.1.0-beta.16 2021-03-15 16:09:23 +01:00
composer.json Use latest version of settings package 2021-05-03 01:35:46 -04:00
LICENSE Update LICENSE 2020-01-05 22:28:27 +01:00
README.md Fixed Broken Badges in ReadMe.md (#2358) 2020-10-04 16:11:39 -04:00

PHP Tests Total Downloads Latest Version License StyleCI

About Flarum

Flarum is a delightfully simple discussion platform for your website. It's fast and easy to use, with all the features you need to run a successful community. It is designed to be:

  • Fast and simple. No clutter, no bloat, no complex dependencies. Flarum is built with PHP so its quick and easy to deploy. The interface is powered by Mithril, a performant JavaScript framework with a tiny footprint.

  • Beautiful and responsive. This is forum software for humans. Flarum is carefully designed to be consistent and intuitive across platforms, out-of-the-box.

  • Powerful and extensible. Customize, extend, and integrate Flarum to suit your community. Flarums architecture is amazingly flexible, with a powerful Extension API.

Installation

This repository contains Flarum's core code. If you want to set up a forum, visit the Flarum skeleton repository.

Contributing

Thank you for considering contributing to Flarum! Please read the Contributing guide to learn how you can help.

Security Vulnerabilities

If you discover a security vulnerability within Flarum, please send an e-mail to security@flarum.org. All security vulnerabilities will be promptly addressed. More details can be found in our security policy.

License

Flarum is open-source software licensed under the MIT License.