Limit Sort Click to AntD Table Sort Icon

In my AntD table, I’ve added a column resizer. But when resizing, accidental clicks triggers the column sorter which is not good. I was trying to limit the sort click only the built-in sort icon of the AntD table. But doesn’t work.

So thought of creating a full custom table header instead. But the required clicks doesn’t actually get triggered on click. Need a global solution due to existing column titles.

const ResizableTableTitle = ({...}) => {
  const {
    title,
    sorter,
    sortOrder = 'descend',
    sortDirections,
    onHeaderCell,
  } = column || {};
  const isSortable = !!sorter;

  if (!width || disableResize) {
    return <th {...restProps} />;
  }

  const renderSorter = () => {
    if (!isSortable) return null;

    return (
      <span
        className="ant-table-column-sorter ant-table-column-sorter-full"
        onClick={() => console.log('render sorter parent span')} // <- This doesn't work
      >
        <span
          onClick={() => console.log('render sorter child span')} // <- This doesn't work
          className="ant-table-column-sorter-inner"
          aria-hidden="true"
        >
          <span
            role="img"
            aria-label="caret-up"
            className="anticon anticon-caret-up ant-table-column-sorter-up"
          >
            <svg
              viewBox="0 0 1024 1024"
              focusable="false"
              data-icon="caret-up"
              width="1em"
              height="1em"
              fill="currentColor"
              aria-hidden="true"
            >
              <path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" />
            </svg>
          </span>
          <span
            role="img"
            aria-label="caret-down"
            className="anticon anticon-caret-down ant-table-column-sorter-down"
          >
            <svg
              viewBox="0 0 1024 1024"
              focusable="false"
              data-icon="caret-down"
              width="1em"
              height="1em"
              fill="currentColor"
              aria-hidden="true"
            >
              <path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" />
            </svg>
          </span>
        </span>
      </span>
    );
  };

  const content = (
    <div
      className="ant-table-column-sorters"
      style={{...}}
      onClick={() => console.log('Header clicked')} // <- Only this works
    >
      <span className="ant-table-column-title">
        {typeof title === 'function' ? title() : title}
      </span>
      {renderSorter()}
    </div>
  );

  return (
    <Resizable
      width={width}
      height={0}
      handle={(handleAxis, ref) => (
        <div
          role="button"
          tabIndex={0}
          ref={ref}
          className={`handle-${handleAxis}`}
          style={{
            position: 'absolute',
            zIndex: 1,
            cursor: 'ew-resize',
            userSelect: 'none',
            ...
          }}
        >
          <i className="icon core-icon core-drag drag-icon" />
        </div>
      )}
      onResize={onResize}
      onResizeStop={onResizeStop}
      draggableOpts={{
        enableUserSelectHack: true,
        disabled: disableResize,
        grid: [10, 0], // Adjust grid size as needed
      }}
      axis="x"
      resizeHandles={['e']}
    >
      <th {...restProps}>{content}</th>
    </Resizable>
  );
};

In here only the mentioned console log is happening. Others doesn’t

following is part of the common Table Component

  const updatedColumnData = useMemo(() => {
    if (columnResizeDisable) {
      return columnData;
    }
    return columnData.map((column) => {
      ...
      return {
        ...column,
        sorter: false,
        width: finalWidth,
        onHeaderCell: () => ({
          column,
          width: finalWidth,
          onResize: handleResize(column.dataIndex),
          onResizeStop: handleSaveResize(column.dataIndex),
          disableResize,
        }),
      };
    });
  }, [...]);

  return (
    <Table
      columns={updatedColumnData}
      dataSource={dataSource}
      components={{
        header: {
          cell: columnResizeDisable ? undefined : ResizableTableTitle,
        },
        ...components,
      }}
      onChange={onChangeOverride}
      ...
    />
  )

How to customize Highcharts Euler diagram?

I would like to create a Euler diagram with Highcharts library :

My goal example:

I found this solution, which involves forcing the x attribute of the points.

I would like to do something similar to the example, but I need the dataLabels and I want them to be correctly positioned on each circle.

Please see what I tried

Highcharts.chart('container', {
  chart: {
    events: {
      load: function() {
        var points = this.series[0].points,
          point1R = points[0].shapeArgs.r;

        points[1].graphic.attr({
          y: points[1].graphic.getBBox().y - (point1R - points[1].shapeArgs.r)
        });

        points[2].graphic.attr({
          y: points[2].graphic.getBBox().y - (point1R - points[2].shapeArgs.r)
        });
      }
    }
  },
  series: [{
    type: 'venn',
    dataLabels: {
            inside: true,
            enabled: true,
            verticalAlign: 'top'
        },
    data: [{
      sets: ['A'],
      value: 10
    }, {
      sets: ['B'],
      value: 3
    }, {
      sets: ['C'],
      value: 1,
    }, {
      sets: ['A', 'C'],
      value: 1
    }, {
      sets: ['A', 'B'],
      value: 3
    }, {
      sets: ['B', 'C'],
      value: 1
    }]
  }]
});

Could someone help me to design it ? Thank you in advance !

Creating a Open Source (Web Cam Random Web-App) [closed]

im developing a project like ChatRoulette or similar & i need help for ideas & coding.

In case you want to hop in with me you can either contact me at:

  • X: https://x.com/@ShadyFeliu
  • GitHub: https://www.github.com/ShadyFeliu

Also you have the repo at GitHub: https://github.com/ShadyFeliu/chatroulette-app

I appreciate your help & your ideas.

Thank you!

Getting more ideas & collaborate at the project.

How to Extract Structured Schedule Data from Excel and Use It in a Web App

I’m working on a web app that generates class routines based on semester and section input. I have an Excel file containing detailed schedules for all semesters at my university.

Each class entry looks like this:

  • CSE 328.2 (UDD)

  • CSE 328 → Course code

  • .2 → Section

  • (UDD) → Faculty code Some classes are 1.5 hours, others 2 hours, and they’re arranged by day and time.

Goal
I want to extract this data from Excel and use it to build a website where a user selects their semester and section, and the app generates their full weekly schedule automatically.

enter image description here

Questions:

What’s the best way to extract structured data from this Excel file?

Should I use a database to store the parsed data for faster retrieval, or read directly from Excel?

What technologies/libraries would be ideal for this (Python, JS, etc.)?

I’ve attached a screenshot for reference (note: image available externally).

Any help on parsing strategy, data modeling, or design logic is appreciated

Flutter WebView (flutter_inappwebview 6.1.0) not loading external JS script in React page — blank screen issue for few users only

I have a Flutter app using flutter_inappwebview: ^6.1.0. The frontend is built in Flutter, and the backend is Spring Boot (Java).

In the Flutter app, I load a WebView using initialUrlRequest, pointing to a React-based webpage (form.tsx). The React page tries to dynamically load a JavaScript file via an API endpoint, then notifies Flutter when it’s rendered.

React code(form.tsx)

const script: HTMLScriptElement = document.createElement('script');
script.src = formScriptUrl; // loaded via axios blob: "/down?formPath=/resources/example/form-ex.js"
script.defer = true;
script.onload = function () {
  window.flutter_inappwebview.callHandler('formRendered');
};
document.body.appendChild(script);

The JS file is fetched from a Spring API:

return await axios( {
  url: '/down?formPath=/resources/example/form-ex.js',
  method: 'GET',
  responseType: 'blob',
  headers: {
    'Content-Type': 'text/javascript'
    'Accept': 'application/json',
  },
});

Once the formRendered signal is received in Flutter, we run this:

await _webViewController?.evaluateJavascript(source: 'getBodyHtml()');

Where getBodyHtml() is:

const formEl = document.getElementById("body-html-area");
const BodyHtml = formEl?.innerHTML || '';
return BodyHtml;

Problem:

  1. No API call is made to /down?formPath=…. The server has no request or error logs.
  2. We wrapped the script logic in try-catch, with an alert() in case of errors — but no alert shows.
  3. The WebView just shows a blank screen.
  4. This issue occurs only for 2~3 users. Most users have no problems.
  • Devices include both Android and iOS.
  • Minimum Android version observed: 14
  • No consistent pattern (e.g., Galaxy S23 works for some, fails for others)

What I’ve tried:

  • Confirmed the JS file loads fine when accessed directly in browsers.
  • Confirmed window.flutter_inappwebview.callHandler() works for most users.
  • Verified getBodyHtml() works in normal conditions.
  • Confirmed correct MIME type (text/javascript) and response format (blob).
  • Added alert() statements in the script load path — but nothing is triggered for affected users.
  • No CORS error is shown (and most users work fine, so it shouldn’t be a policy issue).

What could cause this script loading to silently fail on only a few devices?

Is there something about how blobs, script injection, or WebView caching works differently on a few devices or under rare network conditions?

How to cleanup querySelectorAll in useeffect

Here is my code
export default function EventList() {

useEffect(() => {
    const parent = document.querySelector("ul")
    const child = document.querySelectorAll("li")
    if (parent) {
        parent.addEventListener("click", (event) => {

            console.log("parent clicked")
        }, true)
    }

    if (child) {
        child.forEach(function (list) {
            list.addEventListener("click", (event) => {
                event.stopPropagation()
                console.log("child clicked")
            })
        })
    }
    return () => {
        parent.removeEventListener("click", console.log("parent clicked"))
        child.removeEventListener("click", console.log("child clicked"))
    }

}, []);

return (
    <>
        <ul>
            <li>name</li>
            <li>age</li>
            <li>address</li>
        </ul>
    </>
)

}

Above code giving error as below
Uncaught TypeError: child.removeEventListener is not a function

How to stop parent page scrolling when hovering over a cross-origin iframe?

I have a chatbot interface that is loaded inside an iframe. This iframe is embedded on other websites using a script tag and is cross-origin. The problem is, when the user scrolls with the mouse or touchpad while the cursor is over the iframe, both the iframe content and the parent page scroll at the same time. I want to prevent the parent page from scrolling when the cursor is over the iframe, but due to cross-origin restrictions, I cannot access the iframe’s internals directly. I’ve tried a few methods like hiding the parent scroll temporarily, but none are smooth or reliable. Looking for a better, user-friendly solution to this.

I attempted to hide the parent page’s scroll using overflow: hidden on mouse enter and re-enable it on mouse leave. However, these approaches were not smooth and caused UX issues. Since the iframe is cross-origin, I can’t directly listen to scroll or pointer events inside it. I expected that when the user scrolls while hovering over the iframe, only the iframe content would scroll, but in all cases, both the iframe and the parent page scroll at the same time.

React Bootstrap Cards are Overlapping

I am trying to create a react bootstrap card view, Where all cards should have some space between each other, But my created react bootstrap cards do not have the expected space between them.

I have tried to achieve the above mentioned design, here is my App.js Code

import './App.css';
import HeaderComponent from './HeaderComponent';
import FooterComponent from './FooterComponent';
import BootstrapPractice from './BootstrapPractice';
function App() {
  let name = "Absar Ahmad"
  let testArray = [10, 20, 30, 40];
  let myObject = {
    'name': "Object In JXS",
    'cName': "MERN",
    'Desc': "React JS Learning"
  }

  let status = true;
  return (
    <div className='main' >
      <HeaderComponent />
      <h1 className='text-danger'>{name}</h1>
      {
        testArray.map((arrayValues, i) => {
          return (
            <div key={i}>
              {arrayValues}
            </div>
          )
        })
      }

      <div>{myObject.name}</div>
      <div>{myObject.cName}</div>
      <div>{myObject.Desc}</div>
      <div>Sum of 10 and 20= {10 + 20}</div>

      {
        status ? <h1 style={{ color: "red", backgroundColor: "yellow" }}>Welcome to Ternary Operator</h1> : ""
      }


      <div className='row'>
        <CardExample />
        <CardExample />
        <CardExample />
        <CardExample />
        <CardExample />
        <CardExample />
        <CardExample />
      </div>


      <BootstrapPractice />

      <FooterComponent />

    </div>
  );
}

export default App;


function CardExample() {
  return (
    <div className='cardItems'>Card Div</div>
  )
}

Here is my BootstrapPractice.js Code:

import Card from 'react-bootstrap/Card';
import { Col, Container, Row, Button } from 'react-bootstrap'

function BootstrapPractice() {
    return (
        <Container fluid>
            <Container>
                <Row>
                    <Col className='col-12 text-center py-4'>
                        <h1>Our Courses</h1>
                    </Col>
                </Row>
                <Row>
                    <Col lg="3" md="6">
                        <Card style={{ width: '18rem' }}>
                            <Card.Body>
                                <Card.Title>Card Title</Card.Title>
                                <Card.Text>
                                    Some quick example text to build on the card title and make up the
                                    bulk of the card's content.
                                </Card.Text>
                                <Button variant="primary">Go somewhere</Button>
                            </Card.Body>
                        </Card>
                    </Col>

                    <Col lg="3" md="6">
                        <Card style={{ width: '18rem' }}>
                            <Card.Body>
                                <Card.Title>Card Title</Card.Title>
                                <Card.Text>
                                    Some quick example text to build on the card title and make up the
                                    bulk of the card's content.
                                </Card.Text>
                                <Button variant="primary">Go somewhere</Button>
                            </Card.Body>
                        </Card>
                    </Col>
                    <Col lg="3" md="6">
                        <Card style={{ width: '18rem' }}>
                            <Card.Body>
                                <Card.Title>Card Title</Card.Title>
                                <Card.Text>
                                    Some quick example text to build on the card title and make up the
                                    bulk of the card's content.
                                </Card.Text>
                                <Button variant="primary">Go somewhere</Button>
                            </Card.Body>
                        </Card>
                    </Col>
                    <Col lg="3" md="6">
                        <Card style={{ width: '18rem' }}>
                            <Card.Body>
                                <Card.Title>Card Title</Card.Title>
                                <Card.Text>
                                    Some quick example text to build on the card title and make up the
                                    bulk of the card's content.
                                </Card.Text>
                                <Button variant="primary">Go somewhere</Button>
                            </Card.Body>
                        </Card>
                    </Col>
                    <Col lg="3" md="6">
                        <Card style={{ width: '18rem' }}>
                            <Card.Body>
                                <Card.Title>Card Title</Card.Title>
                                <Card.Text>
                                    Some quick example text to build on the card title and make up the
                                    bulk of the card's content.
                                </Card.Text>
                                <Button variant="primary">Go somewhere</Button>
                            </Card.Body>
                        </Card>
                    </Col>
                    <Col lg="3" md="6">
                        <Card style={{ width: '18rem' }}>
                            <Card.Body>
                                <Card.Title>Card Title</Card.Title>
                                <Card.Text>
                                    Some quick example text to build on the card title and make up the
                                    bulk of the card's content.
                                </Card.Text>
                                <Button variant="primary">Go somewhere</Button>
                            </Card.Body>
                        </Card>
                    </Col>
                </Row>
            </Container>
        </Container>
    )
}


export default BootstrapPractice;

Here is my App.css Code:

.row{
  max-width: 1320px;
  margin: auto;
  flex-wrap: wrap;
  display: flex;
}

.cardItems{
  flex-basis: 23%;
  margin: 1%;
  height: 200px;
  background-color: brown;
}

.main{
  max-width: 1320px;
  margin: auto;
  background-color: antiquewhite;
}

Here is my HeaderComponent.js

import React from 'react'

export default function HeaderComponent() {
    return (
        <div>
            <h1>HeaderComponent</h1>
        </div>
    )
}

And here is my FooterComponent.js Code

import React from 'react'

export default function FooterComponent() {
  return (
    <h1>Footer  Component</h1>
  )
}

Here is the output of my code: My Tried Card View Design

Here is what i expected it to look like
Expected Output

How to efficiently stream and visualize real-time neural network training metrics in a web dashboard without blocking the UI?

You’re building a web application that monitors machine learning model training in real-time. The backend sends training metrics (loss, accuracy, gradient norms) every few seconds via WebSocket, but you’re experiencing performance issues when updating multiple charts simultaneously. The browser becomes unresponsive during heavy data updates, especially when displaying loss curves for multiple epochs

Disabling Bootstrap event delegation for specific DOM elements

Environment

  • Bootstrap version: 5.3.3
  • Browser: Chrome (latest)
  • Framework: Vue.js 3 with Phaser 3.87.0

Problem Description

I’m developing a game using Phaser 3 within a Vue.js application that uses Bootstrap 5 for UI components.
I’ve encountered a performance issue: whenever a user clicks to move a piece in the game, a Bootstrap click event is being triggered and processed, causing frame drops.

Using Chrome’s performance profiler [screenshot], I can see that:

  1. Every click on the game canvas triggers a Bootstrap event handler
  2. These handlers take considerable time to process
  3. The game logic is handled by Phaser, not Bootstrap
  4. Removing bootstrap.min.js import increases frame rate

What I’ve Tried

I’ve attempted several approaches to prevent Bootstrap from handling events on the game container:

  1. Stop event in Vue.js. Result: disable both bootstrap and phaser event handling:
// In mounted() method
this.$refs.gameContainer.addEventListener('click', this.stopEvent, true);
this.$refs.gameContainer.addEventListener('mousedown', this.stopEvent, true);
// Same for mouseup, touchstart, touchend, touchmove

stopEvent: function(event) {
    event.stopPropagation();
    event.preventDefault();
}

  1. Selective event stop in Vue.js. Result: nothing changes:
stopEvent: function(event) {
    if (this.$refs.gameContainer && this.$refs.gameContainer.contains(event.target)) {
      const isBootstrapEvent = new Error().stack.includes('bootstrap');
      if (isBootstrapEvent) {
        event.stopPropagation();
        event.preventDefault();
      }
    }
}
  1. Stop event in Phaser.js. Result: nothing changes:
this.input.on("pointerdown", this.stopEvent, this);
this.input.on("pointerup", this.stopEvent, this);

stopEvent(pointer) {
    const event = pointer.event;
    event.stopPropagation();
    event.preventDefault();
}
  1. Using data-bs-no-jquery attribute. Result: nothing changes:
<div id="game-container" ref="gameContainer" data-bs-no-jquery="true"/>
  1. CSS pointer-events modifications. Result: disable both bootstrap and phaser event handling:
.bootstrap-element {
  pointer-events: none;
}

#game-container {
  pointer-events: auto;
}

Unfortunately, these solutions either:

  • Block all events (including those needed by Phaser)
  • Don’t effectively prevent Bootstrap from processing the events

Questions

  1. Is there an official way to tell Bootstrap to ignore events on specific DOM elements or containers?

  2. Is there a way to configure Bootstrap’s event delegation system to exclude certain elements from event processing?

  3. Are there any known conflicts between Bootstrap’s event handling and canvas-based libraries like Phaser, and any recommended solutions?

Any guidance would be greatly appreciated. Thank you!

Force Scrollbar to Appear For Mac Sequoia Users

I have a complaint from a user that they cannot scroll my website because they are using Mac OS Sequoia. I have a specific place on my app where there is a div with only a scrollbar in it. That div appears to allow the user to scroll several containers simultaneously in sync. It has been working fine for years until Mac OS Sequoia. Suddenly, those users cannot see the scrollbar and therefore cannot scroll horizontally. I cannot control my user’s computers or their settings so please don’t tell me to change their computer setting. I would like a CSS or JS way of forcing the scrollbar to always be visible. I tested this in BrowserStack using both Safari 18.4 and Chrome 137. I also tested it in BrowserStack with Mac Sonoma and didn’t have the issue so it is new to Sequoia. I have also tried these settings:

/// <reference path="_colors" />
/// <reference path="_mixins" />
/// <reference path="maincss" />

::-webkit-scrollbar-corner {
    background: $light-gray;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-bar-color, $medium-gray) var(--scroll-bar-bg-color, $light-gray);
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    -webkit-appearance: none;
}

*::-webkit-scrollbar-track {
    background: var(--scroll-bar-bg-color, $light-gray);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--scroll-bar-color, $medium-gray);
    border-radius: 20px;
    border: 3px solid var(--scroll-bar-bg-color, $light-gray);
}

.scrollbar-container {
    display: none;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch; /* optional for smooth scroll on iOS */
}

My HTML:

    <div id="scrollable-block"></div>
    <div class="scrollbar-container" style="width: 1036px;">
        <div class="scrollbar-details" style="width: 1393px;">&nbsp;</div>
    </div>

Drag-and-Drop files from VS Code to Firefox/Chome drags filenames on macOS

When dragging files from VS Code to my JS application in Firefox or Chrome I get several string items (e.dataTransfer.items has several strings but 0 files and e.dataTransfer.files has 0 files). Each string has the absolute path of the file or other info about the file.

Things that do work:

  • Finder to Firefox/Chrome
  • VS Code to/from Finder
  • VS Code to Safari (although Safari has other issues with my JS app)

Things that do not work:

  • VS Code to Firefox – get 3 strings: two file:/// URIs and 1 ‘regular’ absolute path
  • VS Code to Chrome – get 6 strings: ‘regular’ absolute path, file:/// URI, JSON array with ‘regular’ absolute path, JSON array file:/// URI, JSON array with an object with a bunch of file information (path, how many lines, view state, language, encoding), and an empty string.

Things I haven’t tested:

  • Other operating systems (Windows or Linux)
  • Other programs with draggable files

I am implementing drag-and-drop using elem.addEventListener("drop", (e) => {...}) and rootElem.addEventListener("dragover", (e) => { e.preventDefault(); });

Is there any way to work around this rather large issue?

  • Access the files based on their local absolute paths? I find this hard to believe as possible due to typical browser security restrictions.
  • Implement drag-and-drop differently like using a <input type=file>?
  • Change a setting in VS Code?

Working between VS Code and non-Safari on macOS is important due to a closed environment. However, we can control settings in VS Code.

How to handle back navigation between route groups in Expo Router?

I’m using Expo Router with file-based routing, and my app is organized into multiple route groups, like this:

app/
  (main)/
    _layout.tsx       // Contains a Tabs layout
    index.tsx         // Default screen when entering (main)
    screenA.tsx
    screenB.tsx
  (modals)/
    modalA.tsx
    modalB.tsx

From a screen in the (main) group (e.g. screenA), I navigate to modalA. Then from modalA, I navigate to modalB. The navigation flow looks like:

(main)/screenA → (modals)/modalA → (modals)/modalB

In (modals)/_layout.tsx, I use a shared HeaderBackButton to handle back navigation across all modals.

Main Layout Code ((main)/_layout.tsx)

export default function MainLayout() {
  return (
    <Tabs screenOptions={{ headerShown: false }}>
      <Tabs.Screen name="index" />
      <Tabs.Screen name="screenA" />
      <Tabs.Screen name="screenB" />
    </Tabs>
  );
}

Modal Layout Code ((modals)/_layout.tsx)

import { Stack } from 'expo-router';
import { HeaderBackButton } from '@react-navigation/elements';
import { useRouter } from 'expo-router';

export default function ModalLayout() {
  const router = useRouter();

  return (
    <Stack
      screenOptions={{
        headerLeft: () => (
          <HeaderBackButton
            onPress={() => {
              router.back();
            }}
          />
        ),
      }}
    />
  );
}

Current behavior

  • Pressing back from modalB correctly returns to modalA
  • But pressing back from modalA goes to /index in the (main) group, instead of back to screenA, which originally opened the modal

So the modal-to-modal navigation works, but the connection between the modal and the originating screen is lost.

What I’m trying to achieve

  • Back from modalB → modalA
  • Back from modalA → the screen that opened it (screenA)
  • Without manually passing a returnTo param or tracking state
  • Back navigation should behave like a normal stack even across route groups

Questions

  1. How does navigation history work across route groups in Expo Router?
  2. Why does router.back() from modalA go to (main)/index instead of screenA?
  3. Is there a recommended way to preserve stack behavior across route groups (e.g. from tab screens to modals)?
  4. Do route groups isolate navigation history, and if so, how can I work around that for modal flows?

Any guidance or best practices would be appreciated.