Skip to content

Added upload button for .pgn files in load_position section#2448

Merged
veloce merged 5 commits intolichess-org:mainfrom
ChrompyCoder:main
Jan 9, 2026
Merged

Added upload button for .pgn files in load_position section#2448
veloce merged 5 commits intolichess-org:mainfrom
ChrompyCoder:main

Conversation

@ChrompyCoder
Copy link
Copy Markdown
Contributor

@ChrompyCoder ChrompyCoder commented Dec 18, 2025

The title

@HaonRekcef
Copy link
Copy Markdown
Collaborator

Nice feature:) What happens if a pgn file containing multiple games get imported?

@ChrompyCoder
Copy link
Copy Markdown
Contributor Author

Nice feature:) What happens if a pgn file containing multiple games get imported?

it will paste it in the box but wont allow you to execute options
just like you have anything other then pgn in your clipboard it will paste but wont allow you move forward

@veloce
Copy link
Copy Markdown
Contributor

veloce commented Dec 21, 2025

Thanks for your contribution. As I said in your other PR, it is nice to post a screen recording in the PR. I like to see what the feature does without having to read the code to try understand it.

@ChrompyCoder
Copy link
Copy Markdown
Contributor Author

@veloce Please find attached the video for the upload button feature

  • DEFAULT: using clipboard: allows you to paste anything and everything in clipboard but allows you to proceed only when its a single pgn to board editor/analysis
  • for incomplete .pgn files: allows you to paste but wont allow you to proceed to board editor/analysis
  • for multiple .pgn files: allows you to paste but wont allow you to proceed to board editor/analysis
  • for other files: wont allow you select
  • for single .pgn files: allows you to paste and allow you to proceed to board editor/analysis
uploadpgnLICHESS.mp4

@ijm8710
Copy link
Copy Markdown

ijm8710 commented Dec 29, 2025

Looks interesting! 2 questions:

  • Do we think it makes sense to display toast if pgn not accepted? (Please make sure you are uploading .pgn for a single game). Or obvious enough as is?
    • Just sparking discussion, no need to adjust pr yet unless others all agree?
  • @HaonRekcef you seemed excited and I trust you! Is it decently common to have pgn saved? Figure most times I'd either have them imported into li already or grabbing the text from chesscom. Never encountered them being saved within files but curious if top players do this?

@ChrompyCoder
Copy link
Copy Markdown
Contributor Author

  • Do we think it makes sense to display toast if pgn not accepted? (Please make sure you are uploading .pgn for a single game). Or obvious enough as is?

i guess but the feature behaved the same earlier also for the clipboard feature also. i will try to add it in the future PRs.

  • @HaonRekcef you seemed excited and I trust you! Is it decently common to have pgn saved? Figure most times I'd either have them imported into li already or grabbing the text from chesscom. Never encountered them being saved within files but curious if top players do this?

we had the clipboard feature so i thought i might as well add the upload one. No harm with more features to upload games right?
If you have any more features requests/adjustments, please mention those too

@ijm8710
Copy link
Copy Markdown

ijm8710 commented Dec 29, 2025

For sure! I wasn't doubting it was curious to hear anecdote of how others find it useful since holz seemed excited about it

@HaonRekcef
Copy link
Copy Markdown
Collaborator

* @HaonRekcef you seemed excited and I trust you! Is it decently common to have pgn saved? Figure most times I'd either have them imported into li already or grabbing the text from chesscom. Never encountered them being saved within files but curious if top players do this?

PGN is the most common format for saving and sharing games and opening analysis between players. Eventually it would be great if the app could open and create PGN files containing multiple games.

@veloce
Copy link
Copy Markdown
Contributor

veloce commented Jan 9, 2026

How would you handle a PGN with multiple games? @HaonRekcef

@veloce veloce merged commit ed95ad4 into lichess-org:main Jan 9, 2026
1 check passed
@HaonRekcef
Copy link
Copy Markdown
Collaborator

@veloce
The user should have the ability to select between the different games, similar as it is in studies.

But this is a major feature, I will try to make a big Issue detailing what features would be great in an offline analysis Board v2.

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.

4 participants