Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-app text and markdown publishing #4436

Closed
wants to merge 17 commits into from
Closed

In-app text and markdown publishing #4436

wants to merge 17 commits into from

Conversation

btzr-io
Copy link
Collaborator

@btzr-io btzr-io commented Jun 26, 2020

⚠️ Experimental branch

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Issue Number:

What is the current behavior?

What is the new behavior?

Other information

@btzr-io
Copy link
Collaborator Author

btzr-io commented Jun 26, 2020

First UI draft, just the basic component structure ( missing main logic )

test_UI

@btzr-io
Copy link
Collaborator Author

btzr-io commented Jun 27, 2020

Waiting for:

add file text to publish state #330

@kauffj
Copy link
Member

kauffj commented Jun 29, 2020

I WAS ON VACATION SO I AM LATE TO EXPRESS MY EXCITEMENT

HOPEFULLY ALL CAPITAL LETTERS MAKES UP FOR IT

@neb-b
Copy link

neb-b commented Jun 29, 2020

@btzr-io I merged your lbry-redux pr. You can point the desktop at 85f0f574bd082ca5d0b87dcba11863fb3f050555

@kauffj
Copy link
Member

kauffj commented Jul 1, 2020

@btzr-io are you unblocked on this?

@btzr-io
Copy link
Collaborator Author

btzr-io commented Jul 2, 2020

@kauffj yeah, I'm still experimenting on some things, cant push changes yet

@btzr-io
Copy link
Collaborator Author

btzr-io commented Jul 3, 2020

Added a save dialog so the user can choose where to save the new "story" as a markdown or text file.

Almost there, somethings left to do:

  • Merge publishStory and publishFile into one component ?
  • Cleanup code ( Add comments, simplify etc )
  • Make it work on the web.
  • Error handling.
  • Check if content changed ( The text editor was used )
  • Test: claim edit
  • Test: claim publish

@btzr-io
Copy link
Collaborator Author

btzr-io commented Jul 4, 2020

Looks like my machine ( windows 10 ) don't have any registration of the markdown content type.
I'll use the file extension as fallback to check if is a text file for now...

Is there a better way to handle this ?

make publishing story work on the web

fix file not loading when missing content type
@btzr-io
Copy link
Collaborator Author

btzr-io commented Jul 4, 2020

Now publishing a "story" should also work on web, I'm still not sure how to handle the editing part.
How can I get the file contents on the web version ( lbry.tv )? should I just use the streaming url ( also how can I get it ) ?

On desktop I can just rewrite the original file if a change is made, I guess on web I'll need to create a new file and re-upload it, what happens to the old file ?

Also If the user removes the file from desktop, will this be handled in a similar way ?

@neb-b
Copy link

neb-b commented Jul 7, 2020

I'm not sure of a better way to do that, but since this is only for markdown files, I think just checking the content type should be ok.

I think you will need to use the streaming url web, to get the streaming URL, you need to call Lbry.get, then can access it with makeSelectStreamingUrlForUri. Can you just delete the old file after creating a new one?

Also If the user removes the file from desktop, will this be handled in a similar way ?

I'm not sure what that means. Aren't these just temporary files? I didn't think the user would see them.

@neb-b
Copy link

neb-b commented Jul 15, 2020

@btzr-io How is this going? Anything I can help with?

@btzr-io
Copy link
Collaborator Author

btzr-io commented Jul 17, 2020

@seanyesmunt Almost done, a few flow warnings / errors I need to fix, I'll let you know if I have more questions

@neb-b neb-b assigned btzr-io and unassigned neb-b Jul 20, 2020
@btzr-io btzr-io marked this pull request as ready for review July 24, 2020 00:54
@btzr-io btzr-io marked this pull request as draft July 24, 2020 00:57
@btzr-io btzr-io closed this Jul 27, 2020
@btzr-io btzr-io reopened this Jul 27, 2020
@btzr-io
Copy link
Collaborator Author

btzr-io commented Jul 27, 2020

I'll reopen a new one 😛

@btzr-io btzr-io deleted the poe branch August 5, 2020 01:52
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.

3 participants