linguabot commited on
Commit
b236ddd
·
verified ·
1 Parent(s): c31f347

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. client/src/components/Refinity.tsx +8 -4
client/src/components/Refinity.tsx CHANGED
@@ -199,6 +199,10 @@ const Refinity: React.FC = () => {
199
  React.useEffect(() => {
200
  recomputeOverflow();
201
  }, [recomputeOverflow, flowIndex, isFullscreen]);
 
 
 
 
202
  React.useEffect(() => {
203
  const onResize = () => recomputeOverflow();
204
  window.addEventListener('resize', onResize);
@@ -541,13 +545,13 @@ const Refinity: React.FC = () => {
541
  <div
542
  ref={(el)=>{ textRefs.current[v.id]=el; }}
543
  className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1 relative`}
544
- style={{ maxHeight: 'calc(100% - 11.5rem)' }}
545
  >
546
  {v.content || ''}
547
- {overflowMap[v.id] && (
548
- <span className="pointer-events-none absolute right-2" style={{ bottom: '8rem' }}>…</span>
549
- )}
550
  </div>
 
 
 
551
  {isCenter && (
552
  <div className="action-row absolute left-6 right-6 bottom-6 swiper-no-swiping" data-version-number={v.versionNumber} style={{ pointerEvents: 'auto', transform: 'translateZ(0)', zIndex: 3000 }}>
553
  {/* Invisible first child to bypass first-child quirks while matching pill styles (kept in place) */}
 
199
  React.useEffect(() => {
200
  recomputeOverflow();
201
  }, [recomputeOverflow, flowIndex, isFullscreen]);
202
+ React.useEffect(() => {
203
+ const id = window.setTimeout(() => recomputeOverflow(), 0);
204
+ return () => window.clearTimeout(id);
205
+ }, [versions, flowIndex, isFullscreen, recomputeOverflow]);
206
  React.useEffect(() => {
207
  const onResize = () => recomputeOverflow();
208
  window.addEventListener('resize', onResize);
 
545
  <div
546
  ref={(el)=>{ textRefs.current[v.id]=el; }}
547
  className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1 relative`}
548
+ style={{ maxHeight: 'calc(100% - 10.5rem)', paddingBottom: '0.25rem' }}
549
  >
550
  {v.content || ''}
 
 
 
551
  </div>
552
+ {overflowMap[v.id] && (
553
+ <div className="pointer-events-none absolute right-2 text-gray-700" style={{ bottom: '7.75rem' }}>…</div>
554
+ )}
555
  {isCenter && (
556
  <div className="action-row absolute left-6 right-6 bottom-6 swiper-no-swiping" data-version-number={v.versionNumber} style={{ pointerEvents: 'auto', transform: 'translateZ(0)', zIndex: 3000 }}>
557
  {/* Invisible first child to bypass first-child quirks while matching pill styles (kept in place) */}