chore: change border of placeholder for spreadsheet (#3631)

* change border to place holder for spreadsheet

* add completed cylces exception fix

* remove window idle callback for making issues visible
This commit is contained in:
rahulramesha 2024-02-12 20:25:37 +05:30 committed by GitHub
parent a303e52039
commit d90aaba842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 9 deletions

View File

@ -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,

View File

@ -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
)

View File

@ -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