Skip to content

Commit

Permalink
Merge branch 'main' into feature/1336-Add-dark-mode
Browse files Browse the repository at this point in the history
* main:
  #3673 - Update dependencies
  update dead link to the new file
  #4055 - Editor scrolls up when left sidebar is opened/closed
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-28.2
  #4052 - Admins no longer see all projects in the project overview
  • Loading branch information
reckart committed Jun 7, 2023
2 parents f51efbe + be78046 commit 4b36b30
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions inception/inception-brat-editor/src/main/ts/src/BratEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ export class BratEditor implements AnnotationEditor {
element.dispatcher = this.dispatcher
element.visualizer = this.visualizer

// Ensure that the visualizer is resized when the container element size changes, e.g. when
// the sidebars are opened or closed.
if (element.parentElement) {
new ResizeObserver(() => {
console.log(`resize: ${element.id} ${element.clientWidth} ${element.clientHeight}`)
this.dispatcher.post('resize')
}).observe(element.parentElement)
}

this.resizer = new ResizeManager(this.dispatcher, this.visualizer, ajax)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export class VisualizerUI {

resizerTimeout: number
onResize (evt: Event) {
if (evt.target === window) {
if (!evt || evt.target === window) {
clearTimeout(this.resizerTimeout)
this.resizerTimeout = setTimeout(() => this.dispatcher.post('rerender'), 300)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ logging.level.de.tudarmstadt.ukp.inception.security=TRACE

A custom logging configuration can be specified when starting up {product-name} using the parameter
`-Dlogging.config=/path/to/your/log4.xml`. This should be a standard Log4J2 configuration file.
A good starting point is the default configuration used by {product-name} which can be found in link:https://github.com/inception-project/inception/blob/main/inception/inception-app-webapp/src/main/resources/log4j2.xml[our code repository].
A good starting point is the default configuration used by {product-name} which can be found in link:https://github.com/inception-project/inception/blob/main/inception/inception-app-webapp/src/main/resources/log4j2-spring.xml[our code repository].

== Logging in JSON format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void showHideAction(AjaxRequestTarget aTarget)
{
expanded = !expanded;
saveSidebarState();
WicketUtil.refreshPage(aTarget, getPage());
aTarget.add(findParent(SidebarPanel.class));
}

public boolean isExpanded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,11 @@ private static String formatDate(Date aTime)

private List<ProjectEntry> loadProjects()
{
var isAdmin = userRepository.isAdministrator(currentUser.getObject());
return projectService.listAccessibleProjectsWithPermissions(currentUser.getObject())
.entrySet().stream() //
.map(e -> new ProjectEntry(e.getKey(), e.getValue())) //
.filter(e -> e.getLevels().contains(MANAGER)
.filter(e -> isAdmin || e.getLevels().contains(MANAGER)
|| containsAny(e.getLevels(), dashboardProperties.getAccessibleByRoles()))
.sorted(comparing(ProjectEntry::getName)) //
.collect(toList());
Expand Down

0 comments on commit 4b36b30

Please sign in to comment.