66 Commits

Author SHA1 Message Date
Henriette Darge 655756631f [67007] Render the WP full view from rails (#20109)
* Create a FullView::CopyComponent for WorkPackages which is routed from rails

* Remove angular splitCopy route and component as it was overwritten by the angular fullCopy route for quite some time already and nobody complained. So we decided to remove the splitCopy completely

* Create FullView::CreateComponent for WorkPackages which is now routed from rails instead of Angular

* First draft of implementing the FullView route for WorkPackages from rails

* Pass correct tab from the URL to the FullView::ShowComponent

* Do a hard reload to "create" route when we are not routed from Angular

* Adapt routing spec to new WorkPackage routes and to some fine-tuning with the WP routes

* Show correct tab in WP Full view and change URL when clicking a tab entry

* Adapt to new rails based routing

* Fix some routes and redirects

* Make sure, the split screen stil renders correctly

* Remove back button from WP full view

* Fix routing issues

* Start fixing specs

* Attempt to override the browser history to be able to use browser back

* Use helper function to build new WP url string

* Adapt spec that now partially renders backend toasts

* Remove ability to move to fullscreen

Theoretically, we can re-add it by posting to some form endpoint, but
not worth it for the first iteration

* Disable cache-control on angular routed pages, so back links work

* Fix double click to fullscreen

* Adapt navigation and title setting

* Let WP breadcrumb to a hard reload instead of Angular transition

* Redirect when the WP route is incomplete (this is the attempt to re-implement an angular functionality)

* Navigate with Turbo when double clicking a card

* Adapt onboarding tour to new hard reload when switching to WP full view

* Fix some specs

* Fix more tests

* Hide Overview tab on FullView

* Correct check for incomplete routes

* Do a hard refresh when coming from slpit screen to full view

* Fix notification navigation

* Adapt attachment spec as the tab switch cannot be done anymore while dragging

* Fix more tests

* Please rubocop and fix more tests

* Attempt to fix navigation_spec

* Add debian_base for pullpreview

---------

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2025-11-03 09:02:16 +01:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Bruno Pagno c2886046cd update comment permission names 2025-04-24 13:12:32 +02:00
Kabiru Mwenja 64fa080d3f Remove redundant specs
Attachment scenarios are covered in `spec/features/activities/work_package/activity_tab_comment_editor_spec.rb`
Notably: there is no longer a special permission for adding attachments to wp comments, rather they are treated
as inline- if a user can comment, then they can add attachments.

The lifecycle of the attachment is tied to it's containing comment.
2025-04-14 16:33:55 +03:00
Jonas Jabari e6c4eee65f fixing attachement and edit_work_package specs, cleanup abstract_work_package page util 2025-01-24 19:19:50 +01:00
Oliver Günther b214c61315 Reset some specs 2025-01-14 13:23:57 +01:00
Oliver Günther f791d33b72 Replace specs 2025-01-14 10:20:35 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Dombi Attila 89ce735d23 Merge branch 'dev' into epic/49688-custom-set-of-project-attributes-grouped-in-sections 2024-03-19 20:42:54 +02:00
Oliver Günther 7dfa9fe6cf Fix changed button name 2024-03-13 09:41:46 +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
ulferts 31b52f5249 Merge remote-tracking branch 'origin/release/13.0' into dev 2023-10-23 11:08:27 +02:00
ulferts 6623a2b48b Merge release/13.0 into dev 2023-10-20 14:23:47 +02:00
Dombi Attila f14d6d9cc8 [#49507] File Drag and Drop
https://community.openproject.org/work_packages/49507
2023-10-19 15:27:52 +03:00
ulferts 5b2bc41f41 Merge remote-tracking branch 'origin/dev' into easier-factory-role-setup 2023-10-12 12:09:27 +02:00
ulferts 4a62ab9061 Merge remote-tracking branch 'origin/dev' into implementation/50193-fix-role-class-hierarchy 2023-10-11 14:10:04 +02:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Richard Richter d3da174412 wp/attachment_upload_spec: added add_work_package_attachments tests 2023-10-06 07:06:38 +00:00
Dombi Attila ec42caa72f [#49507] File Drag and Drop
https://community.openproject.org/work_packages/49507
2023-10-02 13:25:56 +03:00
Oliver Günther 92259181ce Adapt specs to use introduced helpers 2023-09-13 09:02:42 +02:00
Aaron Contreras 4e3ff548a3 Switch work_packages/attachments/attachment_upload_spec to cuprite 2023-06-29 09:25:05 -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 97600a6c49 refactor: Extract spec uploading code in a class
The flaky test fixed 59eb308cbb was failing because the test was not
waiting for the attachments element to be displayed. In some other
similar tests, the code was waiting for it, and one test ever scrolled
to that element.

If code was properly factored, the above test would never have been
flaky.

This commit is an attempt to factor the interactions with the
attachments list so that the next test written using it will be reliable
by default.
2023-04-06 14:25:55 +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 aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +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
Benjamin Bädorf fecb2805f4 Add drop zone to attachment list (#11606)
* Initial attachment list changes

* Merge attachment list and uploads

* Move upload mechanisms to op-attachment

* Refactoring attachment styles

* Fix state handling of attachments

* Drag and drop works

* Improve drop zone styles

* Small style improvement

* Remove debug log

* Finished wiki attachments upload spec

* Attachments upload spec for forum works

* Add feature spec for document drag & drop

* Add feature spec for budget attachment drag & drop

* Add feature spec for workpackge attachment drag & drop

* Add default value for attachment list to fix specs

* Fix attachment list for work package create page, remove unused styles

* Fix linting errors

* Add extra checks in document attachment uplaod spec

* Adress PR comments

* Fix broken selector in spec

* Make sure to blur in the ckeditor instance

* Fix meeting module attachment spec

* Fix qa selector

* Fix eslint errors

* Fix rubocop errors
2022-11-22 10:44:11 +00:00
Eric Schubert 1630edab90 Merge pull request #10800 from opf/implementation/41849-adapt-the-style-of-the-attachments-section-to-the-new-designs
[#41849] adapt the style of the attachments section to the new designs
2022-06-22 11:38:19 +02:00
Oliver Günther 7610dd7989 Clear attachments store on finishing creation
https://community.openproject.org/wp/42933
2022-06-20 16:12:53 +02:00
Eric Schubert 53e2cecaf7 [#41849] add data-qa-selector to new attachment html 2022-06-16 15:11:20 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Oliver Günther 01f99785c5 Add spec to drop something on activity 2022-03-31 10:41:27 +02:00
Oliver Günther e6d50f6357 Extend attachments drop helper to allow a stopover 2022-03-31 10:14:46 +02:00
Eric Schubert b2f8f98c11 [chore] minor fixes to sass and spec files 2022-03-30 14:02:53 +02:00
Eric Schubert 3bc3106a87 [#41340] migrate attachments to files tab
- https://community.openproject.org/work_packages/41340
- added new files tab to wp details view
- added attachments components to files tab
- removed attachments from wp single view, except for wp creation
- fixed a couple of eslint issues in affected files
- migrated attachments to resource store
- added upload to attachment store
- pull in newly built ckeditor
- removed old, hacky regression test
2022-03-22 14:24:12 +01:00
Oliver Günther dba03e043d Fix positioning of dropping of attachments for ckeditor 2022-03-07 14:26:26 +01:00
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Benjamin Bädorf 3aaac1c7ce Rename most notification to toaster instances (#9765)
* Rename most notification to toaster instances

* Frontend builds

* Fix spec build

* Rename more notification elements to toaster

* Rename toaster-box to op-toast

* Fix op-toast-container

* Rename toasters upload progress

* Try fixing page.rb toaster check

* Fix some specs, break some others

* Correctly overwrite toast_type

* Fix more specs

* Fix one more notification to toaster rename

* Fix linting errors, harmonize naming more

* Remove byebug debugging statement

* Remove byebug debugging statement

* Rename notification in the backend, too

* Rename more instances of notifications to toastService

* Rename backend back to notification since bundle gems expect it there

* expect_toaster -> expect_toast

Co-authored-by: Henriette Darge <h.darge@openproject.com>
2021-11-04 16:25:55 +01:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
Cyril Rohr b4086b2968 Standalone CI docker container (#8943) 2021-02-02 15:33:33 +01:00
Benjamin Bädorf e848d44dea Fix/update wysiwyg styles (#8844)
This is a refactoring of the CSS classes in the WYSIWYG editor. The classes now use proper BEM and are almost completely independent of other CSS. It also includes small style refactorings, like a reduction of heading size in attribute fields, and an increase in heading size in all other instances.

* Initial class definitions

* Added more classes

* Added Table of Contents basics

* CkEditor applying custom CSS classes to p, h1, h2, h3, h4, h5, h6, li and blockquote

* CKEditorInspector removed

* op css class for headings

* op css class for paragraphs

* op css class for code/code block

* adapt specs to altered markdown/html generation

* adapt grid/budget representers to altered signature

* op css class for lists

* op css class for toc

* op css class for links

* Start working on typography css

* op css class for tables

* Fixing more typography, trying out larger headers

* Applying custom classes to li, a, blockquote, figure, table, tr, td, th, image, codeblock, figcaption and macros

* adapt specs to altered link classes

* op css class for images

* apply user content container class throughout application

* CSS alignment custom classes applied to table

* op css class for task list checkbox

* Added task checkbox class

* amend list checkbox class in backend

* op css class for table thead element

* adapt specs on image html generation

* Updated table and typography styles

* Update typography and figure styles

* Figure overflow handling

* Table alignment styles + ckEditor styles removed

* rename wiki-anchor to op-uc-link_permalink

* wrap table in div as well as figure

* Updated code-block

* Update permalinks

* Fixed a lot about tables

* Removed Description header from work-packages page

* Fix frontend styles

* Add placeholder styling, fix toc

* Fixed figure print

* working with table aligns

* Custom class add to task lists

* Custom classes applied to theads

* op-uc-container custom class added to container

* Codeblocks inside pre elements

* Fix: single <code> and <a> tags

* explicitly require overwritten gem class

Apparently, the gem is not loaded yet when it is registered as a filter when in eager loading mode

* adapt spec expectation to altered toc rendering

* CkInspector removed

* Latest ckeditor changes

* remove highlight css class from wiki content

* allow html pipleline to handle macros with additional classes

* Fixed a lot of print css for tables

* Add general print css back in

* Update Table of Contents styling

* Custom classes on ul, ol, li and task-lists

* Revert "Custom classes on ul, ol, li and task-lists"

This reverts commit 0d27d28137.

* Custom classes on ul, ol, li and task-lists

* Custom classes on column's th

* remove placeholder class when rendering

* WOrking on task lists

* Changing task-list classes, changed tests

* Updated list styles

* Remove unused todo list styles

* remove checked in binstubs

* Fix table of contents

* adapt todo list handing in backend pipeline

* adapt specs to altered css classes

* Add numbers to table of contents

* Better comments in table of contents

* Fix: wrap single <table> with a <figure>

* Fixes to todo list design

* Updated todo list scss to fix nested lists

* adapt selectors in table spec

* Update table styles

* Improve table borders more

* Custom classes specs

* Fix: no need to remove regular list classes when its type changes

* Add modifier for inline headings

* Update table editing styles

* Remove break-word tests

* wrap images just like tables

* Update figure content styles

* Fix: All tests passing (ul.op-uc-list_task-list)

* div.op-uc-figure--content wrapping tables

* Specs for figures wrappers div.op-uc-figure--content

* Fix: add custom classes to links and codes again

* Table wrapper div reverted + specs

* Fix inline palceholders

* Custom macro type classes

* Add basic macro placeholder changes

* Move heading permalink after text

* Fix word-break spec

* Sending figure styles to the backend (width)

* extend test to take ckeditor placeholder into account

* avoid adding bem classes multiple times

* attempt to fix flickering spec

* Removing image spinner when uploading finishes

* adapt spec expectations

Co-authored-by: Aleix Suau <info@macrofonoestudio.es>
Co-authored-by: ulferts <jens.ulferts@googlemail.com>
2020-12-04 12:25:26 +00:00
Markus Kahl c1b82bad00 direct uploads to S3 for attachments including IFC models
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2020-08-07 15:28:09 +01:00
Oliver Günther d44389bbdc Scroll to save button to avoid attachment spec error 2020-05-29 09:33:31 +02:00
Henriette Dinger 78985c2975 Attempt to stabilise the spec (Assumption: The click is either done to early or in the small area below the fig-caption where the whole image is selected --> This will replace the image when the text is entered) 2019-11-22 15:39:23 +01:00
ulferts 87eac68ce3 attempt to stabilize flickering spec 2019-11-07 10:24:51 +01:00
Henriette Dinger 6f92035ccc Rename EditField classes used for tests and remove WorkPackage reference 2019-10-02 10:30:04 +02:00