compose-us / flottform

A better UX for file uploads #build-in-public
https://github.com/compose-us/build-in-public/blob/main/README.md#ux-improvement-for-file-uploads-in-web-forms-working-title-flottform
Other
1 stars 0 forks source link

Problems with the Default UI #55

Closed nidhal-labidi closed 1 month ago

nidhal-labidi commented 1 month ago

Description

The handling of text from the client is not working properly. 1) We need to add a function to for createClientUrl that redirects us to the page containing a form for sending text (which already exist) Sample solution would be:

const createTextClientUrl = async ({ endpointId }: { endpointId: string }) => {
    const clientBase = 'https://localhost:5175/flottform-text-client/';
    if (!browser) {
    throw Error('should not create a client URL when not in browser mode');
    }
    return `${clientBase}${endpointId}`;
};

2) We need to add a parameter to the function createTextItem (which is returned bycreateDefaultFlottformComponent ) to attach the received text inside the input field and NOT just inside the UI element.

Links / References

Further links on the topic

Tasks / Definition of Done

Further information The image below shows the text attached to the UI and not to a specific input field!

Image