Skip to content

feat: Add prominent "Download sample" button to CSV import upload step#16193

Merged
charlesBochet merged 2 commits intotwentyhq:mainfrom
Anshgrover23:feat/download-sample-button
Dec 1, 2025
Merged

feat: Add prominent "Download sample" button to CSV import upload step#16193
charlesBochet merged 2 commits intotwentyhq:mainfrom
Anshgrover23:feat/download-sample-button

Conversation

@Anshgrover23
Copy link
Copy Markdown
Contributor

@Anshgrover23 Anshgrover23 commented Nov 28, 2025

Description

Improves discoverability of the "Download sample" feature in the CSV import flow by replacing the text link with a prominent button, addressing customer feedback that the option was hard to find.

Closes #16028

Screenshots

Before

image

After

image

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Nov 28, 2025

Greptile Overview

Greptile Summary

Improves the discoverability of the "Download sample" feature by converting it from an underlined text link to a prominent secondary button. The change addresses customer feedback that users were unable to find the download sample option mentioned in documentation.

The implementation:

  • Replaced StyledTextAction styled component with StyledButtonsContainer for better layout control
  • Added a secondary MainButton for "Download sample" below the primary "Select file" button
  • Removed the download sample link from the footer text
  • Used fullWidth prop on both buttons for consistent sizing within a 200px max-width container
  • Maintained proper spacing with theme.spacing(2) gap between buttons

The changes are minimal, focused, and follow the codebase conventions for styled components and theming. No custom instructions were violated.

Confidence Score: 5/5

  • This PR is safe to merge with no issues detected
  • The changes are straightforward UI improvements that enhance discoverability. The implementation correctly uses existing MainButton component with valid props (fullWidth, variant), follows styled-component patterns consistent with the codebase, and uses theme spacing appropriately. No logic changes or potential runtime errors introduced.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/components/DropZone.tsx 5/5 Replaced text link with prominent secondary button for "Download sample", improved layout with button container

Sequence Diagram

sequenceDiagram
    participant User
    participant DropZone
    participant MainButton
    participant useDropzone
    participant useDownloadFakeRecords

    User->>DropZone: Views CSV upload interface
    DropZone->>MainButton: Renders "Select file" button
    DropZone->>MainButton: Renders "Download sample" button (new)
    
    alt User clicks "Select file"
        User->>MainButton: Click "Select file"
        MainButton->>useDropzone: Trigger open()
        useDropzone->>User: Opens file picker dialog
        User->>useDropzone: Selects CSV/Excel file
        useDropzone->>DropZone: onDropAccepted callback
        DropZone->>DropZone: Process file and continue
    else User clicks "Download sample" (new flow)
        User->>MainButton: Click "Download sample"
        MainButton->>useDownloadFakeRecords: Trigger downloadSample()
        useDownloadFakeRecords->>User: Downloads sample CSV file
    else User drags and drops file
        User->>DropZone: Drag file over drop zone
        DropZone->>DropZone: Show overlay (isDragActive)
        User->>DropZone: Drop file
        DropZone->>useDropzone: onDropAccepted callback
        useDropzone->>DropZone: Process file and continue
    end
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Anshgrover23 Anshgrover23 changed the title feat: Add prominent button to CSV import step feat: Add prominent "Download sample" button to CSV import upload step Nov 28, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 28, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:11840

This environment will automatically shut down when the PR is closed or after 5 hours.

@Anshgrover23
Copy link
Copy Markdown
Contributor Author

@FelixMalfait Can i get a review on this one ?

Copy link
Copy Markdown
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Anshgrover23
Copy link
Copy Markdown
Contributor Author

Anshgrover23 commented Dec 1, 2025

@Weiko @Bonapara Can we merge this one now ?

@Bonapara
Copy link
Copy Markdown
Member

Bonapara commented Dec 1, 2025

The team will review your PR shortly, @Anshgrover23. Thanks for your contribution; this will be a great improvement!

@charlesBochet charlesBochet merged commit 425a381 into twentyhq:main Dec 1, 2025
62 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 1, 2025

Thanks @Anshgrover23 for your contribution!
This marks your 2nd PR on the repo. You're top 15% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@greptile-apps greptile-apps bot mentioned this pull request Dec 1, 2025
NotYen pushed a commit to NotYen/twenty-ym that referenced this pull request Dec 4, 2025
twentyhq#16193)

## Description
Improves discoverability of the "Download sample" feature in the CSV
import flow by replacing the text link with a prominent button,
addressing customer feedback that the option was hard to find.

Closes twentyhq#16028


## Screenshots

### Before

<img width="2504" height="1716" alt="image"
src="https://github.com/user-attachments/assets/7b134634-45e6-4e10-9c49-810b529d6fb0"
/>



### After

<img width="2504" height="1716" alt="image"
src="https://github.com/user-attachments/assets/b0d7b28e-7a3b-4895-81b4-b04297d6ef64"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CSV Import] Better highlight the option to "Download sample"

4 participants