Skip to content

Commit

Permalink
Merge branch 'master' of github.com:informatics-isi-edu/chaise into t…
Browse files Browse the repository at this point in the history
…est-improvements
  • Loading branch information
RFSH committed Dec 13, 2024
2 parents 291cfed + 331a2a7 commit 3816f74
Show file tree
Hide file tree
Showing 93 changed files with 4,589 additions and 1,264 deletions.
34 changes: 17 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,39 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
allow:
- dependency-name: "@playwright/test"
# https://github.com/dependabot/dependabot-core/issues/1778#issuecomment-1988140219
target-branch: master
assignees:
- "jrchudy"
- "RFSH"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
versioning-strategy: "increase"
open-pull-requests-limit: 10
ignore:
- dependency-name: "@playwright/test"
- dependency-name: "moment*"
- dependency-name: "protractor"
# newer versions of eslint drop support for node 18:
- dependency-name: "@typescript-eslint/*"
- dependency-name: "eslint-*"
- dependency-name: "eslint"
- dependency-name: "prettier"
- dependency-name: "patch-package"
# the included version of typescript-eslint/typescript-estree doesn't support 5.6+ typescript:
- dependency-name: "typescript"
# dependencies for old code that we don't need to update:
- dependency-name: "uglify-js"
- dependency-name: "q"
- dependency-name: "@types/q"
- dependency-name: "moment*"
# the recent updates break the array support (https://github.com/informatics-isi-edu/chaise/pull/2517#issuecomment-2292041258)
- dependency-name: "react-hook-form"
# we don't need to update these dependencies as frequently:
- dependency-name: "@babel/*"
- dependency-name: "babel-loader"
- dependency-name: "css-loader"
- dependency-name: "sass-loader"
- dependency-name: "prettier"
groups:
babel:
patterns:
- "@babel/*"
- "babel-loader"
- "css-loader"
- "sass-loader"
bootstrap:
patterns:
- "react-bootstrap"
Expand All @@ -48,6 +51,3 @@ updates:
- "@types/react-dom"
- "react"
- "react-dom"
assignees:
- "jrchudy"
- "RFSH"
2 changes: 2 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- name: Check if version has been updated
id: version-check
uses: EndBug/version-check@v2
with:
diff-search: true
- name: Publish new version
if: steps.version-check.outputs.changed == 'true'
run: |
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ALL_MANUAL_TESTS=$(Manualrecordset)
define make_test
rc=0; \
for file in $(1); do \
npx playwright test --project=chrome $(2) --config $$file || rc=1; \
npx playwright test --project=chromium $(2) --config $$file || rc=1; \
done; \
exit $$rc;
endef
Expand Down Expand Up @@ -269,8 +269,8 @@ SHARED_CSS_SOURCE=$(CSS)/vendor/bootstrap.min.css \
SASS=$(COMMON)/styles/app.css
$(SASS): $(shell find $(COMMON)/styles/scss/)
$(info - creating app.css and navbar.css)
@npx sass --style=compressed --embed-source-map --source-map-urls=relative $(COMMON)/styles/scss/app.scss $(COMMON)/styles/app.css
@npx sass --load-path=$(COMMON)/styles/scss/_variables.scss --style=compressed --embed-source-map --source-map-urls=relative $(COMMON)/styles/scss/_navbar.scss $(COMMON)/styles/navbar.css
@npx sass --quiet --style=compressed --embed-source-map --source-map-urls=relative $(COMMON)/styles/scss/app.scss $(COMMON)/styles/app.css
@npx sass --quiet --load-path=$(COMMON)/styles/scss/_variables.scss --style=compressed --embed-source-map --source-map-urls=relative $(COMMON)/styles/scss/_navbar.scss $(COMMON)/styles/navbar.css

# should eventually be removed
DEPRECATED_JS_CONFIG=chaise-config.js
Expand Down Expand Up @@ -396,14 +396,15 @@ $(BUILD_VERSION):
# using clean-install instead of install to ensure usage of pacakge-lock.json
.PHONY: npm-install-modules
npm-install-modules:
@npm clean-install
@npm clean-install --loglevel=error

# install packages needed for production and development (including testing)
# --include=dev makes sure to ignore NODE_ENV and install everything
# --no-shell: https://github.com/microsoft/playwright/issues/33566
.PHONY: npm-install-all-modules
npm-install-all-modules:
@npm clean-install --include=dev
@npx playwright install --with-deps
@npx playwright install --with-deps --no-shell

# for test cases we have to make sure we're installing dev dependencies and playwright is installed
.PHONY: deps-test
Expand Down
30 changes: 8 additions & 22 deletions config/chaise-config-sample.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
// Configure deployment-specific data here
// for more info: https://github.com/informatics-isi-edu/chaise/blob/master/docs/user-docs/chaise-config.md

var chaiseConfig = {
name: "Sample",
defaultCatalog: "1",
resolverImplicitCatalog: "1",
allowErrorDismissal: true,
confirmDelete: true,
headTitle: 'Chaise',
customCSS: '/assets/css/chaise.css',
navbarBrand: '/',
navbarBrandImage: null,
logoutURL: '/image-annotation',
// signUpURL: '', The URL at a which a user can create a new account
dataBrowser: '',
shareCite: {
acls: {
show: ["*"], // [] <- hide
enable: ["*"] // [] <- disable
}
},
maxColumns: 6,
feedbackURL: 'http://goo.gl/forms/f30sfheh4H',
helpURL: '/help/using-the-data-browser/',
editRecord: true,
deleteRecord: true,
maxRecordsetRowHeight: 160,
navbarBanner: [
{
markdown_pattern: "This is a development version of Chaise",
markdownPattern: "This is a development version of Chaise",
// // to make the banner dismissible:
// dismissible: true,
// // to ensure showing the banner only to certain users:
Expand Down Expand Up @@ -92,24 +82,20 @@ var chaiseConfig = {
footerMarkdown: "**Please check** [Privacy Policy](/privacy-policy/){target='_blank'}",
configRules: [
{
host: ["www.rebuildingakidney.org", "staging.rebuildingakidney.org", "dev.rebuildingakidney.org"], // array of host names
host: ["www.example.org", "staging.example.org", "dev.example.org"], // array of host names
config: {
headTitle: "RBK/GUDMAP",
navbarBrand: "/resources/"
headTitle: "Example",
navbarBrandText: "Example website"
}
}, {
host: ["www.gudmap.org", "staging.gudmap.org", "dev.gudmap.org"], // array of host names
host: ["www.example-2.org", "staging.examle-2.org", "dev.example-2.org"], // array of host names
config: {
headTitle: "GUDMAP/RBK",
navbarBrand: "/"
headTitle: "Example 2",
navbarBrandText: "Example 2 website"
}
}
],
templating: {
engine: 'handlebars'
}
};

if (typeof module === 'object' && module.exports && typeof require === 'function') {
exports.config = chaiseConfig;
}
10 changes: 5 additions & 5 deletions docs/user-docs/chaise-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,21 +409,21 @@ If a property appears in the same configuration twice, the property defined late
```
#### editRecord
If not present or equal to `true`, the recordedit page allows for inserting records and editing records. The record page will have an edit button for both of these cases as well. If equal to `false`, a dialog appears on recordedit that disallows use of the app for both create and edit, and the create/edit button does not appear in the record app.
If present and equal to `false`, the chaise pages will hide all the edit and create buttons regardless of user ACLs. Chaise will also disallow users from accessing recordedit app in this case.
- Type: Boolean
- Default behavior: Allows for inserting and editing records through the recordedit page
- Default behavior: Allows for inserting and editing records through the recordedit page if the user has proper ACLs.
- Sample syntax:
```
editRecord: false
```
#### deleteRecord
If present and equal to `true`, the recordedit page will show delete button if editRecord is also true, and record page will show delete button if this is true. Otherwise, hide delete buttons.
If present and equal to `false`, the chaise pages will hide all the delete buttons regardless of user ACLs. Otherwise chaise will consult the user ACL for conditonally hiding or showing delete buttons.
- Type: Boolean
- Default behavior: recordset and record page will not show a delete buttons
- Default behavior: Chaise pages display delete buttons based on user ACLs.
- Sample syntax:
```
deleteRecord: true
deleteRecord: false
```
#### allowErrorDismissal
Expand Down
3 changes: 3 additions & 0 deletions docs/user-docs/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ Where,
- `pcol`: Based on `pcol` stack node `type`.
- `related`, `related-inline`: Based on `related` stack node `type`.
- `related-link-picker`: Used for the association link picker.
- `related-unlink-picker`: Used for the association unlink picker.
- `facet`: Based on `facet` stack node `type`.
- `facet-picker`: Used for facet picker.
- `fk`: Based on `fk` stack node `type`.
- `fk-picker`: Used for foreign key picker.
- `fk-bulk-picker`: Used for foreign key picker when the selections fill the same foreign key field in multiple recordedit forms
- `fk-dropdown`: Used for foreign key inputs when they are a dropdown.
- `saved-query-entity`: Used for saved query create popup.
- `saved-query-picker`: Used for saved query apply picker.
- `annotation-set`: Annotation list displayed on the viewer app.
Expand Down
56 changes: 56 additions & 0 deletions help-docs/chaise/facet-panel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Filter panel

Filters are the data constraints or restrictions that are applied during search operations. For example, search for "mouse" data, or data submitted by certain "principal investigators".

The filter panel (displayed on the left under "Refine search") contains a list of filter controls used to set these constraints. This page provides details on how the filter panel works. Please find the topics discussed in the table of contents below:

- [Customizing the order of filters](#customizing-the-order-of-filters)
- [How to move filters](#how-to-move-filters)
- [How to save the order](#how-to-save-the-order)
- [How to apply the default order](#how-to-apply-the-default-order)
- [How to apply the saved order](#how-to-apply-the-saved-order)


## Customizing the order of filters {id=customizing-the-order-of-filters}

You can change the order of filters in the filter panel. This section goes over how you could move filters, save the customized order, and, if needed, discard the customized order.

### How to move filters {id=how-to-move-filters}

To move the filters,

1. Left click on the grab ( :span::/span:{.fa-solid .fa-grip-vertical .help-page-icon} ) icon.
2. While holding the left click, move your mouse to the desired location.
3. Release the left click to finish the drag movement.

Keep in mind that this order is not going to be persistent and will change back after refreshing the page. To save the order, please refer to the [How to save the order](#how-to-save-the-order) section.

### How to save the order {id=how-to-save-the-order}

If you would like to save the order in your browser,

1. Click on the menu icon (:span::/span:{.fa-solid .fa-bars .help-page-icon}) besides the "Refine search".

2. In the opened menu, select the ":span::/span:{.fa-solid .fa-check-to-slot .help-page-icon} Save filter order" option.

This will ensure your customized order is saved in your browser. If you would like to apply the default order, please refer to the [How to discard the saved order](#how-to-apply-the-default-order) section.

### How to apply the default order {id=how-to-apply-the-default-order}

If you've customized the order, or applied the saved state, you may go back to the default order by following these steps:

1. Click on the menu icon ( :span::/span:{.fa-solid .fa-bars .help-page-icon} ) besides the "Refine search".

2. In the opened menu, select the ":span::/span:{.fa-solid .fa-undo .help-page-icon} Reset to default" option.

With this, the filter panel will reset to the default order. Some filters move, and some might get opened/closed depending on the current state of the page. If you want to return to your saved order, please follow the steps described [here](#how-to-apply-the-saved-order).

### How to apply the saved order {id=how-to-apply-the-saved-order}

If you have saved the filter order before, we will apply this order when you load the page. If you made some modifications to this order, follow these steps to go back to the saved order:

1. Click on the menu icon ( :span::/span:{.fa-solid .fa-bars .help-page-icon} ) besides the "Refine search".

2. In the opened menu, select the ":span::/span:{.fa-solid .fa-check .help-page-icon} Apply saved state" option.

With this, the filter panel will reset to the saved order. Some filters move, and some might get opened/closed depending on the current state of the page.
Loading

0 comments on commit 3816f74

Please sign in to comment.