Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recordedit with association picker when adding rows using prefill #2490

Merged
merged 55 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
dcd0fae
changes to show and association picker before record edit form input
jrchudy Jun 8, 2024
6a8d6c2
breadcrumb added
jrchudy Jun 11, 2024
600be7d
wait for foreign key data to process before adding more forms and fil…
jrchudy Jun 13, 2024
0690d9c
add more popup modal
jrchudy Jun 14, 2024
547d5d2
show association modal before loading the app page
jrchudy Jun 21, 2024
6619dab
initialize form provider while showing the modal instead of waiting
jrchudy Jun 28, 2024
a541836
add fk column names for the to mapping of the relation
jrchudy Jul 1, 2024
04f1e98
add/remove selected rows when forms removed, input value is updated/r…
jrchudy Jul 12, 2024
9518804
pending hide button for multi set
jrchudy Jul 12, 2024
f219e0e
disable set some button, don't clone unique fk data
jrchudy Jul 15, 2024
8ebf91d
clean up changes, add comments for new functions
jrchudy Jul 16, 2024
6825a66
some more function changes and comments
jrchudy Jul 16, 2024
d6337ce
checkout ermerstJS branch for tests
jrchudy Jul 16, 2024
2cf244d
move prefill object to the provider instead of creating it each time …
jrchudy Jul 16, 2024
a6ae717
bug in refactoring
jrchudy Jul 16, 2024
e403567
fix check that broke domain filter support after refactoring
jrchudy Jul 16, 2024
84c54be
foreign key dropdown support to update the association selected rows …
jrchudy Jul 18, 2024
f023f88
Merge branch 'master' into recordedit-w-association-picker
jrchudy Jul 18, 2024
047c703
comments and update some conditional checks to be more robust
jrchudy Jul 19, 2024
6b17af6
fix test case that has the modal showing for a non-unique pair of fke…
jrchudy Jul 19, 2024
b4efc30
disabled rows in modal have tooltips and button is removed for all di…
jrchudy Jul 26, 2024
8be3047
changes to add tooltips to modal and dropdown rows that are disabled.…
jrchudy Aug 2, 2024
cdd1e0e
resolve merge conflicts
jrchudy Aug 2, 2024
967edeb
check if leaf column is defined before checking/setting the reference
jrchudy Aug 13, 2024
ed1bf14
Merge branch 'master' into recordedit-w-association-picker
jrchudy Aug 13, 2024
8ae338b
condense checks
jrchudy Aug 13, 2024
9cccd0f
comment and remove uneeded variable import
jrchudy Aug 14, 2024
385e1f3
Merge branch 'master' into recordedit-w-association-picker
jrchudy Aug 15, 2024
7439e9a
update chaise changes with APIs added to ermrestJS
jrchudy Aug 26, 2024
53f33cf
PR comments addressed. refactored disabled rows to create an object u…
jrchudy Aug 26, 2024
9281f1c
remove state variable for row that is selected
jrchudy Aug 26, 2024
7483983
Merge branch 'master' into recordedit-w-association-picker
jrchudy Sep 3, 2024
09faf07
update with changes made to ermrestJS
jrchudy Sep 3, 2024
563a5d9
always initialize prefill in RE
jrchudy Sep 4, 2024
cba40c0
fix a few more bugs initializing how recordedit is used
jrchudy Sep 5, 2024
43675ec
adjust styles
jrchudy Sep 6, 2024
ae05526
use bulkcreatefkobject api
jrchudy Sep 10, 2024
62f1078
Merge branch 'master' into recordedit-w-association-picker
jrchudy Sep 16, 2024
f2922dc
add test cases for modal and dropdown inputs
jrchudy Sep 18, 2024
11699e4
fix bug in code that was causing a test case to fail for another unre…
jrchudy Sep 19, 2024
dc5f28f
change check to use constant instead of test value
jrchudy Sep 19, 2024
1bacdc5
rename variables and functions
jrchudy Sep 19, 2024
1a531e3
rename variable and use new alert type in other place
jrchudy Sep 20, 2024
f7a45ee
address comments from the PR
jrchudy Sep 26, 2024
38e13ee
type in foreign key dropdown field. Make sure selected row value is c…
jrchudy Sep 26, 2024
98cfec9
another variable name change since it's the props for recordset only,…
jrchudy Sep 26, 2024
8143cb2
add test case for the edge case of closing the initial modal that sho…
jrchudy Sep 26, 2024
3186b3d
rename variable to be more informative
jrchudy Sep 26, 2024
dfb5d49
use API from ermrestJS to generate ID for a row with linked data
jrchudy Sep 30, 2024
0958f6a
merge conflicts and added modal title test
jrchudy Oct 1, 2024
236f445
move styles, remove console.log, change function name
jrchudy Oct 1, 2024
dac9c00
remove style
jrchudy Oct 1, 2024
510eeb9
remove log and change name of logged stack path
jrchudy Oct 1, 2024
3d5fa56
update logging.md
jrchudy Oct 1, 2024
1d0bc88
remove branch checkout
jrchudy Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
run: |
git clone https://github.com/informatics-isi-edu/ermrestjs.git
cd ermrestjs
git checkout association-display
sudo make root-install
- name: Install chaise
run: |
Expand Down
39 changes: 33 additions & 6 deletions src/assets/scss/_input-switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
background: map-get(variables.$color-map, 'disabled-background');
opacity: 0.55;
}

.spinner-border-sm {
top: 8px;
position: absolute;
Expand All @@ -214,19 +215,21 @@
}

// highlight the recordedit input for visual clarity
.dropdown.show {
.dropdown.show {

/**
* Select the input groups that are not disabled. react-bootstrap tends to toggle the `show` class for Dropdown toggles with a custom element type.
* Select the input groups that are not disabled. react-bootstrap tends to toggle the `show` class for Dropdown toggles with a custom element type.
* this check avoid unexpected highlighting of disabled elements.
*/
>.chaise-input-group:not([aria-disabled="true"]),
.dropdown-menu{
.dropdown-menu {
border: 2px solid map-get(variables.$color-map, 'primary');
border-radius: 6px;
}
}

.responsive-dropdown-menu, .dropdown-menu {
.responsive-dropdown-menu,
.dropdown-menu {
// make sure the menu expands the whole row
width: auto;
min-width: 100%;
Expand All @@ -245,11 +248,11 @@

// remove rounded borders for search input components when in a dropdown
.search-row .chaise-search-box {
.chaise-input-group-prepend > .chaise-input-group-text {
.chaise-input-group-prepend>.chaise-input-group-text {
border-bottom-left-radius: 0;
}

.chaise-input-group-append > .chaise-search-btn {
.chaise-input-group-append>.chaise-search-btn {
border-bottom-right-radius: 0;
}
}
Expand All @@ -264,6 +267,18 @@
.dropdown-item {
cursor: pointer;

&.disabled,
&:disabled {
pointer-events: unset;
cursor: unset;

// bootstrap stylesheets have :hover defined before :disabled so disabled always takes precedence
// redefine with the same hover color to override bootstrap order
&:hover {
background-color: map-get(variables.$color-map, 'recordedit-dropdown-hover');
}
}

label {
padding-left: 31px;
cursor: inherit;
Expand Down Expand Up @@ -328,7 +343,19 @@
&.input-switch-error-danger {
color: map-get(variables.$color-map, 'input-error-message-danger');
}

&.input-switch-error-warning {
color: map-get(variables.$color-map, 'input-error-message-warning');
}
}

// used for foreignkey-dropdown-field
// !important needs to be used here since bootstrap attaches styles directly to the component which override stylesheet styles
.tooltip.reposition-li-tooltip {
left: 10px !important;

.tooltip-arrow {
left: 40px !important;
transform: unset !important;
}
}
4 changes: 2 additions & 2 deletions src/assets/scss/_inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
cursor: not-allowed;
// We are adding this to fix the issue in firefox where the form is not clickable if its disabled
pointer-events: none;

// make sure the input is taking the input-disabled styles and not the default bootstrap/browser ones
// (using * so it selects input, textarea, or any other HTML element that we might have
*::placeholder, *:disabled {
Expand Down Expand Up @@ -320,7 +320,7 @@
.chaise-input-group-text-sm {
height: variables.$btn-height-sm;
min-height: variables.$btn-height-sm;
padding: variables.$btn-padding-y variables.$btn-padding-x;
padding: variables.$btn-padding-sm-y variables.$btn-padding-sm-x;
}

.chaise-input-control-sm {
Expand Down
3 changes: 2 additions & 1 deletion src/assets/scss/_recordedit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
margin-left: auto;

.add-rows-input {
width: 50px;
width: 45px;
padding-left: 5px;
padding-right: 5px;
}
}
}
Expand Down
41 changes: 21 additions & 20 deletions src/assets/scss/_recordset-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,18 @@
display: table-row-group;
vertical-align: middle;

> tr > td.disabled-cell {
background-color: map-get(variables.$color-map, 'table-disabled-background');
}

/* table hover */
> tr:hover {
background-color: map-get(variables.$color-map, 'table-highlight-background') !important;

/* match color from row highlight for disabled cells */
> td.disabled-cell {
background-color: map-get(variables.$color-map, 'table-highlight-background') !important;
}

.hover-show {
visibility: visible;
}
}

/* odd disabled cells need to be darker */
> tr:nth-child(odd) > td.disabled-cell {
background-color: map-get(variables.$color-map, 'table-striped-disabled-background');
}

/* odd row hover for striped table */
> tr:nth-child(odd):hover {
background-color: map-get(variables.$color-map, 'table-striped-highlight-background') !important;

/* odd disabled cells need to match odd row hover for striped table above */
> td.disabled-cell {
background-color: map-get(variables.$color-map, 'table-striped-highlight-background') !important;
}
}
}

Expand Down Expand Up @@ -194,7 +175,27 @@
}

.chaise-btn.select-action-button {
border-radius: 10px;
border-radius: 12px;

&.chaise-btn-secondary {
border-width: 2px;
}

&[disabled] {
min-width: 12px;
width: 12px;
height: 12px;
margin-top: 5px;
}

// change size of single select icon to "fill" the whole button
.fa-regular.fa-circle, .fa-circle-check {
font-size: 1.6rem;
// added here instead of to the button as padding-top to only affect these buttons/icons
margin-top: 1px;
background-color: map-get(variables.$color-map, 'white') !important;
border-radius: inherit;
}
}

// make the button smaller (only visible for primary buttons. for others won't make a difference in UI and that's fine)
Expand Down
2 changes: 2 additions & 0 deletions src/assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ $btn-height-sm: 24px;
$btn-border-width: 1px;
$btn-padding-y: 4px;
$btn-padding-x: 10px;
$btn-padding-sm-y: 2px;
$btn-padding-sm-x: 5px;

// input
$input-remove-width: 18px;
Expand Down
6 changes: 3 additions & 3 deletions src/assets/scss/helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
-moz-user-select: none;
-ms-user-select: none;
white-space: nowrap;
/**
* Fixing button spacing issue. Fix- center aligning the buttons. Adding line-height will make the children of button to
/**
* Fixing button spacing issue. Fix- center aligning the buttons. Adding line-height will make the children of button to
* use this property to override what bootstrap is defining.
*/
display: inline-flex;
Expand Down Expand Up @@ -124,7 +124,7 @@
height: variables.$btn-height-sm;
min-width: variables.$btn-height-sm;
font-size: 1rem;
padding: 2px 5px;
padding: variables.$btn-padding-sm-y variables.$btn-padding-sm-x;
}

// can be used to write media-queries
Expand Down
1 change: 1 addition & 0 deletions src/assets/scss/maps/_color-map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $color-map: (
'primary': #4674a7,
'primary-hover': #428bca,
'recordedit-border': #888888,
'recordedit-dropdown-hover': #e9ecef, // same color as bootstrap dropdown-item hover
'recordedit-highlighted-row': #f7f0cf,
'recordedit-column-permission-warning': rgb(180, 95, 6),
'spinner': #6e6e6e,
Expand Down
Loading
Loading