* add error messages to each field
* move role=alert up so that success messages are also covered
* remove focus code from notification-box directive
The box does not need to be focused as it has the role=alert which will lead to it being read out.
* remove specific focusing behaviour for accessibility mode
The mode was introduced to present error messages to user requiring assistive technology e.g. screen readers. By setting role=alert on the error fields and additionally labeling the fields with the errors, this should no longer be necessary
* Display 'Open this work package in full screen' correctly
Currently, the 'Click here to open this work package in fullscreen
view.' is not implemented correctly:
1. It is not only shown for update and create, but also delete in the
table
2. It is not shown for inline create / edit
3. It is shown in full screen
This reimplements the functionality without requring deep knowledge in
NotificationsService.
* Move NotificationsService
* Move notification box directive
* Move DetailsTabOverviewController
* Move the WP create button to the WP buttons directory
* Move the keepTab service to the wp-panels directory
* Move angular module definitions into separate file
* Move the WP create button into a separate file
* Use TS in WP create button directive
* Refactor the WP create button controller
* Move the has-context-menu directive to the components directory
* Refactor has-context-menu item focus
* Create new button directive and place in table
* Export and use wpButton module
* Add title to form properties
* Add -new modifier to new work package rows
* Add WP inline create directive
* Reduce error widths to cell span
* Save or update work package conditionally
* Mark work package as new
* Implement the WP inline create button
* Style button correctly
* Decide when to activate the field for new WPs
* Remove padding on -new row
* Avoid animation on added -new rows
* Avoid writing title when passed from new workPackage
* Remove jqMigrate warning
* Avoid animations for newly added rows
* Add cancel button to inline create row
* Track new work packages by custom id
If we don't track new work packages, ng-animate will freak out due to
the track by expression. We thus track work packages by setting a custom id set from the
current date.
* Disable focus on errors outside accessibility mode
* Add inline create cancel context menu
* Conditionally set focus on fields
Set focus on the first active field
This focuses on rails-based flashes
1. On the error text for error flashes
2. On the close icon otherwise
This requires a change in the focus directive, which by
default sets focus on page load.
This behavior is now overridden in accessibility mode.
Introduces a directive for storing the visibility state of a
notification (currently used for repository checkout instructions)
in LocalStorage using the `CacheService`.
This should be applied for the notification toggle in `/my/account` as
well.
This allows submitting comments with and without notification
for the created journal.
Using hyperagent resource on activities, the resource `addComment` is
replaced when executing `fetch` on the link.
This breaks subsequent comment requests. This is fixed by requesting
manually on the resource link using `$http`.
This commit also provides the functionality required to comment with or
without notification propagation, and changes the backend to comply to
the APIv3 specification, which defines comments to be sent as a JSON
`{ comment: { raw: 'my comment' } }`.
This commit also provides:
* Displaying the comment input on overview depending on sort setting
* Disable inplace controls when comment is empty
* correctly hiding the comment based on link availability
Adds titles to:
* repository root breadcrumb
* copy to clipboard button
Corrections:
* Avoid copying to clipboard when clicking the input.
* Add hidden-for-sighted label for copy button.
* Remove notifications only when not in accessibility mode
* Avoid generic `-with-gap` button style
* Increase notification timeout
The NotificationsService renders the flash-message directive irrelevant and it additionally displays the notification much nicer than the directive.
Additionally, an ApiNotificationsService is introduced that is able to cover error formats provided by the experimental api-
This will introduce some changes throughout the notifications. Upload
notifications can now group the uploads and the new notification system
can now receive removal commands.
In addition, I took the liberty of adding some minor animations
Signed-off-by: Florian Kraft <f.kraft@finn.de>
this will enable notifications to be sent from anyone using the service,
displayed by the directive. It currently uses the $rootScope which is pretty
inefficient and should probably refactored to an pub/sub pattern style
implementation
Signed-off-by: Florian Kraft <f.kraft@finn.de>