Change repository overview layout to use single rows instead cards. Also remove quick links and add clone action to repository entry. The default repository link now leads to the sources view.
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
If a file and a directory with the same name existed somewhere at the same level in a Mercurial repository, our logic in the fileview command failed to collect them. The parent of the file was mistaken for the entire file path, resulting in confusing errors that the file could not be found in the manifest. With this fix, file detection should now be more secure than before.
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Add a dedicated search page with more results and different types.
Users and groups are now indexed along with repositories.
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
When implementing the remark rehype rework, which was supposed to be backwards-compatible, incorrect mdast was produced by the remarkValuelessTextAdapter in some edge-cases. This caused markdown generated by other plugins, such as the issue-tracker-plugin, to be faulty (e.g. Und die #10 ist *so* toll caused visual artifacts). This PR solves the issue by inlining the children of the empty text node instead of wrapping them in a paragraph. This is also more consistent with the previous output, as can be observed when pairing SCM-Manager <= 2.15.0 with the issue-tracker-plugin and using the aforementioned snippet.
The search link of the index resource is now an array of links instead of single templated link.
The array contains one link for each searchable type.
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Tweaking the existing color scheme for SCM-Mananger to fulfill accessibility requirements lead to the conclusion, that an additional high-contrast-mode is necessary. The proposed colors are demonstrated in the PR.
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
We introduced a new annotation '@IndexedType' which gets collected by the scm-annotation-processor. All classes which are annotated are index and searchable. This opens the search api for plugins.
Add a powerful search engine based on lucene to the scm-manager api.
The api can be used to index objects, simply by annotating them and add them to an index.
The first indexed object is the repository which could queried by quick search in the header.
It should also be possible to create new files in empty non-initiated repositories with the help of scm-manager/scm-editor-plugin/pull/39. So that the plugin can mount itself, a new endpoint was provided hereby.
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
* Fixed missing update if content of diff changes
* Add property to disable automatic refetch in diffs
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
When initially implementing react-query, we focussed on core features. This pull request now replaces the remaining apiClient usages in ui-components and ui-webapp with react-query hooks.
Using a default user with a default password has the implicit risk, that this user is not changed and therefore this system can be compromised. With this change, SCM-Manager does not create the default user with the default password on startup any more, but it shows an initial form where the initial values for the administration user have to be entered by the user. To secure this form, a random token is created on startup and printed in the log.
To implement this form, the concept of an InitializationStep is introduced. This extension point can be implemented to offer different setup tasks. The creation of the administration user is the first implementation, others might be things like first plugin selections or the like.
Frontend components are selected by the name of these initialization steps, whose names will be added to the index resource
(whichever is active at the moment) and will be show accordingly.
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Implements react-query and replaces direct apiClient usage for sources, annotate and history content views.
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Sets aka "fixes" the language attribute of the top level html tag. This was hard coded to 'en' before, what led to bad experiences with screen readers. We now set overwrite the attribute with the language from i18next.
The recently integrated form library react-hook-form does not submit disabled inputs, but a behaviour where interaction with an input is not possible and it is still submitted is necessary. This feature implements a readOnly property for all components that support react-hook-form. It is visually indistinguishable from a disabled input but will be submitted when the form is submitted. All form fields use disabled fieldset wrappers to accomplish this goal because react-hook-form only checks the disabled property on the input itself, not any ancestors, and the inputs are still correctly displayed as disabled.
Fixes the position of repository tags (like 'archived')
when the extension point 'repository.afterTitle' is bound
(for example in the landing page plugin with the fav star).
This fix preserves the context and shows the error in the component where normally the content of the file is displayed, so that you can still change the branch and the path.
Fix annotate overflow: Total div size was smaller than minimum size of individual children (+ margin).
Fix doubled spacing in code content views: Spacing duplicates through .panel-block as default for styling, various containers and inner syntax highlighter definition. Unfortunately, the latter is not easy to change, since it is also used with inline syntax highlighter.