102 Commits

Author SHA1 Message Date
Henriette Darge de68bf0a01 Hide meetings & favorited widgets when the user is not logged in 2026-06-11 09:56:13 +02:00
Behrokh Satarnejad bfa2588bf4 [74198] Remove newest projects in project widget on homepage (#23136)
* Add footer component for widget box

* Add footer component to the widget box as a slot

* Change projects widget to show the favorite projects

* Fix failing test

* Change the subitems widget

* Change the costs and budgets widgets

* Change the meeting widget

* Change the WPs widget in version

* Change memebers widget in project overview

* Change the favorite projects widget in my page

# Conflicts:
#	frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.ts

* Add the widget box to the lookbook

* Add footer for members widget in dashboard

* Fix members widget capability check

* Add feature spec for favorites projects in my page

* Remove committed demo project gitlink

* Remove temporary body variables from the costs and budgets widget templates

* Remove the scroll for favorites widget

* Remove scrollbar for members and favorite projects widgets

* Change projects block to favorite projects

* Refine feature specs

* Fix the widget footer styles globally

* Rename the component name from project favorites to favorite projects

* Rename the test selector for project name

* Move widget content inside the body

* grid widgets stretch their content area so widget footers stay pinned to the bottom

* Ensure frontend-rendered grid widgets keep their turbo-loaded content in the widget flex layout so server-rendered footers stay pinned to the bottom
2026-05-29 08:37:17 +02:00
Henriette Darge 0fbb221c33 Merge remote-tracking branch 'origin/dev' into code-maintenance/68481-remove-new-project-overview-feature-flag 2026-02-24 10:39:21 +01:00
Klaus Zanders 538b3cd29b Merge branch 'dev' into more-visible-scopes 2026-02-12 11:19:23 +01:00
Henriette Darge fe7d4f950d Migrate description widget from Angular to Rails 2026-02-11 09:09:55 +01:00
Klaus Zanders 361e8461d2 fix problems uncovered in routing specs 2026-02-09 15:08:11 +01:00
Klaus Zanders 466a6ac81b Fox more specs and controllers 2026-02-09 15:08:09 +01:00
Klaus Zanders 3e2faec2bd Remove manage_overview permission checks in code 2026-01-20 11:52:06 +01:00
Alexander Brandon Coles 9819eb1cca [#68481] Remove new project overview feature flag 2026-01-09 11:27:53 +01:00
Alexander Brandon Coles cd18853d5e Do not break out of Turbo Frames if nothing rendered
Turbo should do nothing if it encounters a completely empty response.
As such this commit completely removes the layout from Widget Controller
responses, explicitly setting HTTP response status to 204 No Content for
good measure. This should prevent Turbo from "breaking out" of the Turbo
Frame (redirecting to a blank page) when a widget is not rendered.
2025-12-19 14:50:10 -03:00
Alexander Brandon Coles db52cdb048 [#69599] Do not show News widget when module deactivated
https://community.openproject.org/work_packages/69599
2025-12-19 14:49:02 -03:00
Henriette Darge 230a8e7728 Fix frame target to allow actual navigation 2025-11-27 13:49:30 +01:00
Oliver Günther 1014390b48 Add specs 2025-11-25 09:18:16 +01:00
Behrokh Satarnejad 5784aa5694 [68556] All widgets (Overview): Add a blankslate for when there is nothing to show (empty or no permissions) (#20820)
* when there is no members, show a button to add members

* remove turbo attribute

* add a blankslate when there is no member

* show a blankslate when the user doesnt have permission to see the memebers data

* show a blankslate when there is no news to show

* show a blankslate when there is no subitems in subitems widget

* set the correct button label for news in the widget

* add a test for subitems widget

* add a test for news widget

* add a test for members widget

* change test selector in news widget

* change test selector in subitems widget

* change test selector in members widget

* show add news button only when there is a project

* fix translations strings and remove them from js.en.yml

* change ui structure in members widget

* change ui structure in subitems widget

* mock permissions for the user in members widget

* Use test selector instead of css selector

* when the user has only view news permission it shouldn't show add button

* Add a test case for subitems when there are subprojects but user doesnt have permission to see them

* check view permission in any of the subprojects
2025-11-21 11:47:04 +01:00
Tobias Dillmann 78409c4476 [#68876] Status button component specs 2025-11-18 12:03:40 +01:00
Christophe Bliard f19815b807 Fix error 403 with news widget when news module is disabled
https://community.openproject.org/wp/68850

The widget news controller was checking `:view_news` permission before
rendering. For projects without the news module enabled, the permission
check fails and renders a 403 error.

As the news widget from dashboard tab is rendered through Angular with
`WidgetNewsComponent` using a turbo-frame, the 403 error was somehow
rendering a full page error, preventing the page to be displayed
properly. This prevented people from accessing the project page.

This fixes the issue by disabling the permission check for the news
widget, and displaying a "Nothing new to report." message instead when
the module is disabled.
2025-11-07 12:09:08 +01:00
Henriette Darge f3538b5560 Merge remote-tracking branch 'origin/dev' into code-maintenance/68279-move-widgets-grids-module 2025-10-17 15:57:54 +02:00
Behrokh Satarnejad 19fa87dcfb change widget title 2025-10-14 09:33:42 +01:00
Alexander Brandon Coles e75212de12 Fix negative expectation in Members widget spec 2025-10-13 19:22:59 +01:00
Alexander Brandon Coles 3db6901d42 I18n cleanup: Use "lazy" lookup where possible
Consolidates translations in `modules/grids/config/locales/en.yml`.
2025-10-13 19:18:52 +01:00
Alexander Brandon Coles 2e8c8d9c9b Drop Component suffix from Widget class names
Drops superfluous `Component` suffix: the `Widgets` namespace should
make the type and purpose sufficiently clear. This also makes naming
consistent with homescreen blocks.
2025-10-13 18:59:26 +01:00
Alexander Brandon Coles 2145865aeb [#68279] Move Widgets to Grids module
Moves components (including templates, styles, I18n strings), associated
controllers and routing under the grids module.

This change reflects the fact that widgets may be (re)used
across various different grids, e.g. Overviews/Dashboard, My Page and
Homescreen.
2025-10-13 17:32:47 +01:00
Henriette Darge 43b2e01fe7 Move news widget code to overviews module 2025-09-23 08:32:04 +02:00
Henriette Darge 4f4830f64e Move News widget to Overiew module and let it inherit from WidgetComponent 2025-09-22 14:50:29 +02:00
Alexander Brandon Coles 181ba5e9b7 [#67525] API Improvements to WidgetComponent and related components (#20350)
* Rework WidgetComponent to render its own WidgetBox

Adds `rows` slots to `WidgetBoxComponent` with the goal of offering a
similar API to `BorderBox` (albeit subset) and obviating the need for
brittle styling overrides.

Also moves responsibility for rendering `turbo-frame` to the Widget Box.

* Remove suffix from nested Header, Body classes

The `Component` suffix is useful in avoiding collisions with other
objects, especially Rails models, but one `Component` in a
full-qualified class name suffices.

* Fix failing test and pass header id from the widget box component

* Create a new component for showing Rows in the body

* Add component_wrapper to be able to act as streamable

---------

Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
Co-authored-by: Henriette Darge <h.darge@openproject.com>
2025-09-22 13:04:45 +02:00
Alexander Brandon Coles e080187746 Remove debug output from WidgetBoxComponent spec 2025-09-17 23:31:15 +01:00
Alexander Brandon Coles 2107812cf5 Merge branch 'dev' into implementation/66904-split-up-overview-and-dashboard 2025-09-16 17:27:41 +01:00
Alexander Brandon Coles 7fc00e9bee Rework NewsComponent to use semantic lists
Break out list item rendering into a separate `ItemComponent`.
2025-09-15 19:56:42 +01:00
Alexander Brandon Coles 58d196036f Add examples for global and project-scoped News 2025-09-15 16:18:52 +01:00
Alexander Brandon Coles 586106dc67 Move News (BETA) widget to Grids module
Since this widget will be shared between grids implementations, moves
widget, routes, controllers and views to Grids module.

Also fixes widget permission.
2025-09-15 16:18:51 +01:00
Alexander Brandon Coles be1fb77242 [#67255] Widget Box Component - WIP 2025-09-09 20:10:43 +01:00
Oliver Günther e27ac494d3 Consistent naming of upsell, not upsale 2025-04-24 15:52:34 +02:00
Oliver Günther 18574696f5 Fix specs 2025-04-07 10:55:25 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Oliver Günther 58f713d043 Fix grid adding without toolbar 2024-04-23 15:44:38 +02:00
Dombi Attila ca286b4975 Remove unnecessary argument from Pages::Grid#enabld_add_widget_mode 2024-04-23 14:06:25 +03:00
Dombi Attila bf5a0dbf9e Do not display the "Add widget" button unless the available widgets are loaded.
Fixing flaky specs related to displaying empty add widget modals.
2024-04-22 23:17:01 +03:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Oliver Günther 92259181ce Adapt specs to use introduced helpers 2023-09-13 09:02:42 +02:00
Aaron Contreras be21ae4193 Add the Calendars global menu item
Adds the single-level "Calendars" menu item to the global menu.

As a side bonus, some more specs moved to cuprite.
2023-07-12 09:19:13 -05:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Behrokh Satarnejad 8dec25034b [43842] Re-design and small changes to modal dialogues (DS) for coherence (#11246)
* wp deletion modal changes

* fix test fails

* invite user modal changes

* fix eslint issus and add cancel button to summary modal

* add widget modal changes

* new board modal changes

* form configuration modal changes and remove unnecessary class

* WP table export modal changes

* WP save query modal changes

* visibility setting modal changes

* help text modal changes

* help video modal changes

* 2FA password confimation modal changes

* Delete EE token modal changes

* fix eslint errors

* eslint does not check the unbound method

* minor changes to switch the buttons and icon

* fix specs failing for invite user modal changes

* use the correct translations and revert the previous merge

* Fix opAutofocus directive

The opAutofocus directive was not setting focus if used like a normal
`autofocus` HTML attribute:

```
<input opAutofocus />
```

The above example would not produce a focus, because counterintuitively
Angular treats the default input to the directive here as an empty
string instead of undefined. This causes the default value of `true` NOT
to be set. Instead, the empty string was treated like the falsy value
it is.

* add focus on invite user modal while opening

* fix eslint errors

* eslint errors fix

* add icon delete for deleting ee token

* wp delete modal changes: remove unnecessary loading and change op-icon to a span

* remove unused components

* use spot-list for add-widget modal

* wp table configuration modal changes

* fix finding list item in add widget modal specs

* Chore/modal spacing (#11314)

* [chore] reworked spot-container spacings

* [chore] applied spot-container to spot-modal--body

- added style override for spacing within modal body

* [chore] removed unused modal footer class

* Remove scrollbar from project-include

Project include was creating scrollbars for the project list even if
it was not needed. This was caused by tooltips that were hidden in the
background but still affecting layouting.

This commit hides the tooltips correctly, and aligns the HTML structure
of project include to match that of file link list. A minimum height is
added to the project include list to make sure tooltips are readable even
if there is only one item in the list.

* [chore] rework of datepicker modal

- changed spacings, removed inner margins
- changed anchors to buttons (spot-link)
- added flatpickr override
- removed min-height
- moved project include min-height to root element

* [chore] fixed test selector

Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>

* redesign the save query modal changes

* remove op-form class from invite user modal since we have spot-container now

* add text and title for ee modal deletion

* showing the error message when it is not valid value in invite user modal

* close the inroduction video modal  with button

* close the dynamic content modal without jquery

* fx eslint warnnings

* webhook response modal

* remove multiple cancel translation in invite user modal

* fix indentation in html file

Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
Co-authored-by: Eric Schubert <38206611+Kharonus@users.noreply.github.com>
2022-09-22 15:54:22 +02:00
Eric Schubert c8f1e16005 [#43684] migrated op-modal to spot-modal (#11172)
* [#43684] migrated op-modal to spot-modal

- https://community.openproject.org/work_packages/43684
- amended styles
- removed "modal--title"
- removed header component
- removed closing icon
- fixed backdrop click
- removed jquery from modal service

* [#43684] removed unused styling

- fixed some inconsitencies
- readded removed icon
- removed listener on close button

* [#43684] combined spot-action-bar

- used spot-action-bar in combination with spot-modal--footer
- fixed some styling in action bar

* [#43684] replaced more op-modal

- moved spec selectors to spot-modal
- replaced found op-modal in html templates

* [#43684] add no margin to old buttons in new dialogs

- added mobile modal behavior
- fixed some feature spec selectors

* [#43684] added modal close on mobile resolutions

* [#43684] fixed PR issues

- removed old css classes from html
- fixed feature spec click
- readded tour trigger on modal cancel

* when clicking outside the modal it will be closed instaed of clicking on a close button

* exclude _center class from spot-modal sass file itself and add it to the component style sheet

* Words should be break in any case like when there is no space there

* remove unnecessary classes that never used like _fullscreen and _cente, remove _limited-height class to make all the modal look the same

Co-authored-by: bsatarnejad <b.satarnejad@gmail.com>
Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
2022-08-29 10:53:41 +00:00