Skip to content

Commit

Permalink
chore: change border of placeholder for spreadsheet (#3631)
Browse files Browse the repository at this point in the history
* change border to place holder for spreadsheet

* add completed cylces exception fix

* remove window idle callback for making issues visible
  • Loading branch information
rahulramesha authored Feb 12, 2024
1 parent a303e52 commit d90aaba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions web/components/core/render-if-visible-HOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ const RenderIfVisible: React.FC<Props> = (props) => {
if (intersectionRef.current) {
const observer = new IntersectionObserver(
(entries) => {
if (typeof window !== undefined && window.requestIdleCallback) {
window.requestIdleCallback(() => setShouldVisible(entries[0].isIntersecting), {
timeout: 300,
});
} else {
setShouldVisible(entries[0].isIntersecting);
}
//DO no remove comments for future
// if (typeof window !== undefined && window.requestIdleCallback) {
// window.requestIdleCallback(() => setShouldVisible(entries[0].isIntersecting), {
// timeout: 300,
// });
// } else {
// setShouldVisible(entries[0].isIntersecting);
// }
setShouldVisible(entries[0].isIntersecting);
},
{
root: root?.current,
Expand Down
2 changes: 1 addition & 1 deletion web/components/cycles/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const CycleDetailsSidebar: React.FC<Props> = observer((props) => {
const isEndValid = new Date(`${cycleDetails?.end_date}`) >= new Date(`${cycleDetails?.start_date}`);

const progressPercentage = cycleDetails
? isCompleted
? isCompleted && cycleDetails?.progress_snapshot
? Math.round(
(cycleDetails.progress_snapshot.completed_issues / cycleDetails.progress_snapshot.total_issues) * 100
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
as="tr"
defaultHeight="calc(2.75rem - 1px)"
root={containerRef}
placeholderChildren={<td colSpan={100} className="border-b-[0.5px]" />}
placeholderChildren={<td colSpan={100} className="border-b-[0.5px] border-custom-border-200" />}
changingReference={issueIds}
>
<IssueRowDetails
Expand Down

0 comments on commit d90aaba

Please sign in to comment.