Skip to content

Commit

Permalink
revert ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abelpz committed Jan 27, 2025
1 parent 053ec01 commit d45f9f5
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 59 deletions.
2 changes: 1 addition & 1 deletion public/build_number
Original file line number Diff line number Diff line change
@@ -1 +1 @@
281-f6e1a43
282-053ec01
136 changes: 136 additions & 0 deletions revert_changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
commit 053ec01b19403640bde5954db9185bceb0cd3bcd
Author: Abel Pérez <[email protected]>
Date: Mon Jan 27 17:17:38 2025 -0400

add a queue system for branch-merger requests

diff --git a/src/components/translatable/RowHeader.js b/src/components/translatable/RowHeader.js
index aa72680..ffbefc8 100644
--- a/src/components/translatable/RowHeader.js
+++ b/src/components/translatable/RowHeader.js
@@ -12,6 +12,11 @@ import {
getBcvQueryBasedOnRefStr
} from './helpers';

+const WAYPOINT_OFFSETS = {
+ topOffset: '-800px',
+ bottomOffset: '-800px',
+};
+
const styles = {
defaultHeader: {
width: '100%',
@@ -35,7 +40,9 @@ export default function RowHeader({
bookId,
open,
}) {
- const [viewed, setViewed] = useState(false);
+ const [_viewed, setViewed] = useState(false);
+
+ const viewed = true;

const onVisibility = (isVisible) => {
setViewed(isVisible);
@@ -130,7 +137,7 @@ export default function RowHeader({
buttons={actionsMenu}
open={open}
/>
- <Waypoint onLeave={onLeave} />
+ <Waypoint onLeave={onLeave} {...WAYPOINT_OFFSETS} />
</div>
);
};
@@ -143,7 +150,7 @@ export default function RowHeader({
<Typography variant='h6' style={styles.title}>
{chapter && verse !== undefined ? `${bookId.toUpperCase()} ${chapter}:${verse}` : `${bookId.toUpperCase()} ${chapter}`}
</Typography>
- <Waypoint onLeave={onLeave} />
+ <Waypoint onLeave={onLeave} {...WAYPOINT_OFFSETS} />
{actionsMenu}
</div>
</>
@@ -152,7 +159,7 @@ export default function RowHeader({
const skeleton = (
<>
<Skeleton height={150} width='100%' />
- <Waypoint onEnter={onVisibility} onLeave={onLeave} />
+ <Waypoint onEnter={onVisibility} onLeave={onLeave} {...WAYPOINT_OFFSETS} />
</>
);

diff --git a/src/components/translatable/TranslatableTSV.js b/src/components/translatable/TranslatableTSV.js
index 8930dca..79ae9e6 100644
--- a/src/components/translatable/TranslatableTSV.js
+++ b/src/components/translatable/TranslatableTSV.js
@@ -6,6 +6,7 @@ import React, {
} from 'react';
import PropTypes from 'prop-types';
import { useDeepCompareCallback, useDeepCompareMemo } from 'use-deep-compare';
+import { FiMap } from "react-icons/fi";

import { DataTable } from 'datatable-translatable';
import { ResourcesContextProvider } from 'scripture-resources-rcl';
@@ -158,7 +159,8 @@ export default function TranslatableTSV({
<>
{items}
<UpdateBranchButton {...updateButtonProps} isLoading={isLoading | isSaving}/>
- <ErrorDialog title={dialogTitle} content={dialogMessage} open={isErrorDialogOpen} onClose={onCloseErrorDialog} isLoading={isLoading | isSaving } link={dialogLink} linkTooltip={dialogLinkTooltip} />
+ <ErrorDialog title={dialogTitle} content={dialogMessage} open={isErrorDialogOpen} onClose={onCloseErrorDialog} isLoading={isLoading | isSaving} link={dialogLink} linkTooltip={dialogLinkTooltip} />
+ <FiMap />
</>

const columnsMap = {
diff --git a/src/index.css b/src/index.css
index 1fd6166..fa1581d 100644
--- a/src/index.css
+++ b/src/index.css
@@ -19,4 +19,48 @@ code {

h1, h2, h3, h6 {
margin: 0.2%;
+}
+
+
+#translatableComponent [class^='MuiToolbar'] {
+ border-bottom: 1px solid #d5d5d5;
+ /* box-shadow: 1px 2px 13px -10px #000; */
+ background: #e9e9e9;
+ /* color: aqua; */
+}
+
+
+#translatableComponent [id^='MUIDataTableBodyRow']:nth-child(2n-1) {
+ background: #ffffff;
+}
+
+#translatableComponent [id^='MUIDataTableBodyRow']:nth-child(n+2) {
+ border: 3px dashed transparent;
+ border-top-color: #bcbcbc;
+ padding-bottom: 2em !important;
+}
+
+
+#translatableComponent [id^='MUIDataTableBodyRow']:focus-within {
+border: 3px solid #31ade3;
+background: rgba(0,0,0,0.01);
+box-shadow: grey 0px 0px 5px inset;
+}
+
+.header-row > * {
+ padding: 0;
+}
+
+
+
+.header-row h6 {
+ font-weight: bolder
+}
+
+
+.MuiTableCell-root-212:nth-child(1) {
+ background: #fff;
+ position: relative!important;
+ top: 0!important;
+ z-index: 1;
}
\ No newline at end of file
15 changes: 4 additions & 11 deletions src/components/translatable/RowHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ import {
getBcvQueryBasedOnRefStr
} from './helpers';

const WAYPOINT_OFFSETS = {
topOffset: '-800px',
bottomOffset: '-800px',
};

const styles = {
defaultHeader: {
width: '100%',
Expand All @@ -40,9 +35,7 @@ export default function RowHeader({
bookId,
open,
}) {
const [_viewed, setViewed] = useState(false);

const viewed = true;
const [viewed, setViewed] = useState(false);

const onVisibility = (isVisible) => {
setViewed(isVisible);
Expand Down Expand Up @@ -137,7 +130,7 @@ export default function RowHeader({
buttons={actionsMenu}
open={open}
/>
<Waypoint onLeave={onLeave} {...WAYPOINT_OFFSETS} />
<Waypoint onLeave={onLeave} />
</div>
);
};
Expand All @@ -150,7 +143,7 @@ export default function RowHeader({
<Typography variant='h6' style={styles.title}>
{chapter && verse !== undefined ? `${bookId.toUpperCase()} ${chapter}:${verse}` : `${bookId.toUpperCase()} ${chapter}`}
</Typography>
<Waypoint onLeave={onLeave} {...WAYPOINT_OFFSETS} />
<Waypoint onLeave={onLeave} />
{actionsMenu}
</div>
</>
Expand All @@ -159,7 +152,7 @@ export default function RowHeader({
const skeleton = (
<>
<Skeleton height={150} width='100%' />
<Waypoint onEnter={onVisibility} onLeave={onLeave} {...WAYPOINT_OFFSETS} />
<Waypoint onEnter={onVisibility} onLeave={onLeave} />
</>
);

Expand Down
4 changes: 1 addition & 3 deletions src/components/translatable/TranslatableTSV.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import React, {
} from 'react';
import PropTypes from 'prop-types';
import { useDeepCompareCallback, useDeepCompareMemo } from 'use-deep-compare';
import { FiMap } from "react-icons/fi";

import { DataTable } from 'datatable-translatable';
import { ResourcesContextProvider } from 'scripture-resources-rcl';
Expand Down Expand Up @@ -159,8 +158,7 @@ export default function TranslatableTSV({
<>
{items}
<UpdateBranchButton {...updateButtonProps} isLoading={isLoading | isSaving}/>
<ErrorDialog title={dialogTitle} content={dialogMessage} open={isErrorDialogOpen} onClose={onCloseErrorDialog} isLoading={isLoading | isSaving} link={dialogLink} linkTooltip={dialogLinkTooltip} />
<FiMap />
<ErrorDialog title={dialogTitle} content={dialogMessage} open={isErrorDialogOpen} onClose={onCloseErrorDialog} isLoading={isLoading | isSaving } link={dialogLink} linkTooltip={dialogLinkTooltip} />
</>

const columnsMap = {
Expand Down
44 changes: 0 additions & 44 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,4 @@ code {

h1, h2, h3, h6 {
margin: 0.2%;
}


#translatableComponent [class^='MuiToolbar'] {
border-bottom: 1px solid #d5d5d5;
/* box-shadow: 1px 2px 13px -10px #000; */
background: #e9e9e9;
/* color: aqua; */
}


#translatableComponent [id^='MUIDataTableBodyRow']:nth-child(2n-1) {
background: #ffffff;
}

#translatableComponent [id^='MUIDataTableBodyRow']:nth-child(n+2) {
border: 3px dashed transparent;
border-top-color: #bcbcbc;
padding-bottom: 2em !important;
}


#translatableComponent [id^='MUIDataTableBodyRow']:focus-within {
border: 3px solid #31ade3;
background: rgba(0,0,0,0.01);
box-shadow: grey 0px 0px 5px inset;
}

.header-row > * {
padding: 0;
}



.header-row h6 {
font-weight: bolder
}


.MuiTableCell-root-212:nth-child(1) {
background: #fff;
position: relative!important;
top: 0!important;
z-index: 1;
}

0 comments on commit d45f9f5

Please sign in to comment.