Comments (6)
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](https://private-user-images.githubusercontent.com/64783088/258177726-9604719f-4935-4f0c-a7ad-f8a3d1e055ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA0NjQzMDcsIm5iZiI6MTcxMDQ2NDAwNywicGF0aCI6Ii82NDc4MzA4OC8yNTgxNzc3MjYtOTYwNDcxOWYtNDkzNS00ZjBjLWE3YWQtZjhhM2QxZTA1NWFiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE1VDAwNTMyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0NWFmODNhN2ZjOGE2NTdiMTUyYThiOGI5MDg3YjhjOTQzN2JjOWZmZGYwMmExN2MwNTdlN2Y3YmI2MWM0YjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MUQaOGvvU-Bnvz_IdtcJ1FmKSNoq0oqyaI58XNd71D8)
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](https://private-user-images.githubusercontent.com/64783088/258224573-9ae1fb66-f345-467b-8460-95ab0d447c5a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA0NjQzMDcsIm5iZiI6MTcxMDQ2NDAwNywicGF0aCI6Ii82NDc4MzA4OC8yNTgyMjQ1NzMtOWFlMWZiNjYtZjM0NS00NjdiLTg0NjAtOTVhYjBkNDQ3YzVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE1VDAwNTMyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5NzhlZmQ5NTdiNjNhZjI3MTAwZTI4NmNhNzRjY2U5MzIwODdhMjViMzZiNDMyZTY0OWQ5ZDdhMTYzNGI2NWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.X2OKMLGWx8Enm3K9Uq73ucaP6MI0YVnNUY24mkUW7X4)
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.
from streamsync.
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.
Thank you for the update and quick response @ramedina86!!
from streamsync.
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.
Available in v0.1.12, which was just released.
from streamsync.
Related Issues (20)
- change on value of a graph as vega spec does not trigger mutation in extension HOT 6
- Python 3.12 tests issuing DeprecationWarning related to multiprocessing HOT 2
- use poetry instead of setup tools as package manager
- github action enforce PR continuous integration rules
- Changing font-family for entire app not intuitive
- Unable to build docker image with Dockerfile from docs HOT 2
- Event context not working for repeater objects where the repeater object is specified using square brackets "[ ]" HOT 2
- Serving large numbers of images
- pagination component documentation is missing on the official documentation
- Add checkbox column to dataframe that is interactive HOT 1
- Use Pydantic for automating most event payload sanitisers HOT 1
- Question: How to link message component with a state element HOT 1
- How to convert <streamsync.core.BytesWrapper object at 0x1065ca890> to base64
- Create separate test apps for backend and manual frontend testing HOT 1
- declare optional schema on streamsync state HOT 1
- Implement pylint HOT 6
- Update Repeater docs to explain use of dynamic accessors
- add a tooltip option on icon, button, ... component
- File input component doesn't show the name of the uploaded files HOT 1
- Embed Iframe into Streamsync HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamsync.