TexteaInc / funix

Building web apps without manually creating widgets
http://funix.io
MIT License
99 stars 11 forks source link

Spaces in Pasted Text Interpreted as Tabs #61

Closed Aljbab14 closed 1 year ago

Aljbab14 commented 1 year ago

I am writing to bring to your attention an issue that I am currently experiencing while attempting to paste text into Funix. It appears that any spaces within the text are being interpreted as tabs, causing the cursor to jump to the next column. I would greatly appreciate any guidance or assistance you could provide in resolving this matter.

image

image

Yazawazi commented 1 year ago

At: https://github.com/TexteaInc/funix/blob/00cee981c31db6482b580f9af07b5c3ed4629170/frontend/src/components/FunixFunction/ObjectFieldExtendedTemplate.tsx#L639

I will fix it later!

Yazawazi commented 1 year ago

Done in https://github.com/TexteaInc/funix/commit/90c3d47ddd14673cc9bb39f314daef910e364ca6, please check it!

I just tested Google Sheets and Microsoft Excel and they both seem to split columns with tabs.

Image Image

The code is:

from funix import funix
from typing import List
import matplotlib.pyplot as plt
from matplotlib.figure import Figure

@funix(
    widgets={
        ("phrase", "year", "freq", "test"): "sheet"
    }
)
def sheet_trim(phrase: List[str], year: List[int], freq: List[int], test: List[str]) -> Figure:
    fig = plt.figure()
    plt.plot(year, freq)
    return fig
forrestbao commented 1 year ago

Thanks @Yazawazi . I think we should keep the behavior consistent with Goolge Docs and Microsoft Excel.

Yazawazi commented 1 year ago

Fixed in 0.3.7