Coder Social home page Coder Social logo

Comments (6)

ramedina86 avatar ramedina86 commented on June 16, 2024 2

Hey @lambertchu and @samgarvis, thank you for using Streamsync and taking the time to share your thoughts. I'm glad you're enjoying it (minus this, I guess!).

After taking a look at this issue, I've developed a wrap/no-wrap flag. An example (using mock data) is shown below.

sc1

There's currently one limitation, which is that scrolling jumps row by row. So if there's a cell that's taller than the grid, the bottom of the cell won't be visible.

There's a change that was necessary to make, which is allowing the row offset to go down to the last row, see below.

sc2

I hope this is aligned with your use cases. I expect to release it this weekend together with a number of other features.

@samgarvis I worked on a CONTRIBUTING.md file that gives some hints on creating a local dev environment. I haven't merged yet but it's on the dev branch if you want to check that out.


PS: Dataframe behaves differently than other elements because it renders only the rows required to avoid overwhelming the DOM, which is quite easy with as little as 1k rows. So it's creating/destroying elements on demand as you scroll. This means that you cannot know the height of the whole grid beforehand, unless you used a fixed height and say I have 10 rows, so it's 360px. This is because, realistically, you can only know after rendering.

from streamsync.

samgarvis avatar samgarvis commented on June 16, 2024 2

from streamsync.

samgarvis avatar samgarvis commented on June 16, 2024 1

This would be amazing for me too! Honestly, very high priority.
Looking through their code.
It appears from CoreDataframe.vue on line 290: "grid-template-rows": repeat(${displayRowCount.value}, 36px)`` that they hard code the size of each row.
If this could change dynamically based on how many \n there were in a cell, then that would be a life saver

Or even just allow an option to make the row height bigger so every row is the same size and can allow for some line breaks

Wait, can't you just change the styling at line 526 to wrap the text, and not make overflow hidden.
Maybe something like the below line
overflow-wrap: break-word;

.cell {
	height: 36px;
	padding: 8px;
	overflow: hidden;
	white-space: nowrap;
	color: var(--primaryTextColor);
	border-bottom: 1px solid var(--separatorColor);
	display: flex;
	align-items: center;
	border-right: 1px solid var(--separatorColor);
}

from streamsync.

lambertchu avatar lambertchu commented on June 16, 2024 1

Thank you for the update and quick response @ramedina86!!

from streamsync.

samgarvis avatar samgarvis commented on June 16, 2024

Thank you for your awesome work on this tool!

Is there any functionality to apply more flexible, custom styling on dataframe elements?

More specifically, I am looking to apply text wrapping on a dataframe column so that very long strings are completely visible in the column's cells. At the moment, the string is not completely visible if it exceeds the max width of the column.

Also, is there any documentation on testing out changes to this repo locally? I would like to contribute, but I'm having trouble spinning this up locally

from streamsync.

ramedina86 avatar ramedina86 commented on June 16, 2024

Available in v0.1.12, which was just released.

from streamsync.

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.