Widgets ======= Widgets allow to display content on Dashboards. They can be made either for personal dashboard, project dashboard or both. Widget concept is rather old in Tuleap but they got a major rewamp in Spring 2017. While most of the architecture was cleaned up some oddities are still inherited from the past (mainly comes from `Widget` class inheritance). Basic widget: "Welcome message" ------------------------------- The most basic widget you might imagine is the Welcome message: * It comes from Core * It's only static text * No interactions, no preferences. Step 1: Widget class ~~~~~~~~~~~~~~~~~~~~ All widgets must inherit from `Widget` class and have a `NAME` constant. Must of the time name is the 'slug' version of the class name: `MyWelcomeMessage` => `mywelcomemessage`. Then `NAME` is important because this is the identifier that will be stored in database (`dashboards_lines_columns_widgets`). .. NOTE:: it's a bad idea to change `NAME` after integration as you will have to write a forgeupgrade migration bucket otherwise the widget will disappear from all dashboards. The convention is to prefix personal widgets with "MyXXX" and project widgets with "ProjectXXX". You create the MyWelcomeMessage.php file in src/common/widget with following content: .. code-block:: php