Git Product home page Git Product logo

Comments (3)

KevinVandy avatar KevinVandy commented on June 10, 2024 14

A few things here:

This is definitely the nastiest message I've ever received in OSS. There has to be a better way to communicate about optimizations that you want to add to an example who's only purpose is to inspire and get you started.

Lazy sub-rows is a very hard problem to solve. This solution uses server-side pagination to keep it efficient, so that you don't literally have to refetch every single row upon row expansion changes. Just the rows on the current page. Furthermore, react-query is used here so that a lot of these fetches can use caching so that if a specific row expansion configuration has already been fetched, react-query can just read from the local cache instead of refetching.

There are different solutions that you can use if you want. Fetching only a few new sub-rows and then splicing them in on the front-end like it sounds like you want to do is possible, but just needs a lot more code. If you're using pagination, 100 rows will be the max it will fetch, so I see this as a small issue, actually.

Also, being mad that you need to change your back-end API to accomplish this is kinda silly. This is a full-stack problem that requires a full-stack solution.

We are always trying to improve our recommendations and examples. I'm both the maintainer of this library and TanStack Table itself. If you have an example to share for either, we'd love to collaborate. But you have to do it in a way less rude manner, please.

from material-react-table.

ricardo-reis-1970 avatar ricardo-reis-1970 commented on June 10, 2024 3

from material-react-table.

robmen avatar robmen commented on June 10, 2024 2

@ricardo-reis-1970 You can disagree with the solution provided in the example without attacking the person who wrote it. Providing feedback that the example has specific problems can benefit the author and anyone who tries using the example in the future.

At the same time, you can feel frustrated/disappointed/whatever because the example did not work as well as you hoped and that it took time for you to figure that out. But making your complaints personal only upsets the very people who could be helpful.

Here's a potential set of changes you could make in your responses that would make your feedback helpful without being hurtful. Remember the goal is to improve the example for the author and any who come after you.

To add insult — and some more injury — to injury,

You can just delete this.

It's a shame, and a tad indecent, that this is not once referred in the page that no effort is made to add data to the table, but rather a full reboot is the way forward. This begs the question: is the example just irresponsible, or is it the case tha material-react-table is just incapable of updating its data in any grain smaller than 100%?

And before anyone comes with the usual defence of "You know, these are just examples.", or "We're not here to do your job.", or the ultimate "This is open source! What more do you want?", I guess what I want is intellectual honesty.

I think this can be replaced with a single statement, something like: "It would be great if the example pointed out what was necessary when data was being added."

Call me nasty all you want and all the hundred other caveats on open source
and all, but there is no way you can escape the fact that your example
becomes very easy to compare with those plastic buns that come off the oven
in TV cooking shows: perfect looking and FAKE!

You can just delete this.

Your solution requires the whole API to be adjusted to the UI, which is a
great definition of "bad practice". You could also put that one down for
"impossible", as sometimes, go figure, our software actually consumes 3rd
party APIs that don't give a flying 6th letter to our needs. That and the
fact that said APIs might actually be well designed and not wish to
clutter. At some point, you must realise that your solution for this is
just fake, period.

This could be simplified to: "This example requires the API to be adjusted to the UI, which isn't always possible. For example, a 3rd party API that cannot be changed. That will render this example unusable."

Any — and I mean ANY —solution that would change table data incrementally
would be welcome, but your two approaches seem to be:

You could replace this with: "Updating the table data incrementally seems to be missing from the example. As I understand it, you are proposing two approaches:"

100% client*: we dump our (arbitrarily ginormous) data all on the browser
and whatever survives of its CPU and RAM will handle pagination, sorting,
sub-rows, detailed panels and whatever else locally, in ram. If you happen
to have 10000 rows of heavy data (pictures of patients, x-rays) or a
potentially high sub-row count, "buy more RAM".

This could be rewritten: "100% client: we have lots of data that could overwhelm the browser. That would not make this a good solution for our situation where the rows are heavy data (pictures of patients, x-rays) or a
potentially high sub-row count."

100% server: pretty simple: whatever you need, you ask of the API. You
just want to open a sub-row and stuff is already heavy? Tough! Just ask for
absolutely everything you already have on screen, plus the sub-row you want!

I think you're saying it's hard to update your API to be able to request sub-rows, or maybe you're trying to point out that the example can't make sub-row requests, or maybe a third option I don't understand. Ultimately, I think the communication would be improved if there was less emotion and instead focused on helping to improve the example.

I mean, dude, I am an average dev scraping for a living in a small company
and trying to keep up with the great stuff people like you put out there.
You, on the other hand, are quite a big person in the community. The mere
fact that I need to be telling you all this does not feel like I am big
stuff myself. It just feels awkward.

All of this is just personal attacks and does nothing to help the conversation. It does not reflect well on you or your small company.

Also, the Discord community would be a possible great place to go for my
kind of question, except that those... nice gents require I give them my
phone number and that's a big no.

This is a reasonable issue to raise, but this is not the time or place. Raise that issue in the appropriate place (maybe just open a new issue?).

I hope this tone agrees better with your good intentions, although it is
highly dissonant to my own legitimate concerns about sunken costs. And my
apologies if the occasional bent on the moral high ground speech rules (the
6th letter is an "F", oops!).

I don't know how @KevinVandy would take it, but your second response does not improve my impression of you as a bystander in this public forum. You still sound more focused on attacking the person who wrote the example than actually trying to improve it.

I hope this finds you better and the example in question improves for the better of all in the world.

from material-react-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.