A bunch of cosmetic changes surrounding "text" files. #3511

Merged
Yamboy1 merged 13 commits from text-formatting into master 2020-02-07 15:21:30 +01:00
Yamboy1 commented 2020-01-18 09:09:27 +01:00 (Migrated from github.com)

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: Style changes

Fixes

Issue Number: N/A

What is the current behavior?

What is the new behavior?

Other information

Just a few changes for the text viewer (the one which looks similar to Medium)

List of changes:

  • Script files are now added to the list of human readable text files
  • The default width has been increased, and content with longer lines will increase even more to try fit each of it's line properly.
  • Added a better dark theme for the code viewer, designed to integrate with the LBRY dark theme. Also removed the static scrollbar from the bottom of most code editors / viewers.
  • The code viewer theme now changes when the LBRY theme changes.
  • Add a better light theme
  • HTML files now have the same look and feel as the other human readable text files
  • Change lbry files to do the same ^

Other things: (figured i'd put them in the same pr rather than making two new pr's)

  • Add proper links to fonts in index-electron
  • Fix link rendering on the same line in markdown
## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] 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? - [x] Bugfix - [x] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [x] Other - Please describe: Style changes ## Fixes Issue Number: N/A ## What is the current behavior? ## What is the new behavior? ## Other information Just a few changes for the text viewer (the one which looks similar to Medium) List of changes: - [x] Script files are now added to the list of human readable text files - [x] The default width has been increased, and content with longer lines will increase even more to try fit each of it's line properly. - [x] Added a better dark theme for the code viewer, designed to integrate with the LBRY dark theme. Also removed the static scrollbar from the bottom of most code editors / viewers. - [x] The code viewer theme now changes when the LBRY theme changes. - [x] Add a better light theme - [x] HTML files now have the same look and feel as the other human readable text files - [ ] ~~Change lbry files to do the same ^~~ Other things: (figured i'd put them in the same pr rather than making two new pr's) - [x] Add proper links to fonts in `index-electron` - [x] Fix link rendering on the same line in markdown
Yamboy1 commented 2020-01-18 09:21:08 +01:00 (Migrated from github.com)

I'll give an example here:
Before:
image

After:
image

I'll give an example here: Before: ![image](https://user-images.githubusercontent.com/37413895/72660764-fa49b180-3a36-11ea-8959-84980712c4b4.png) After: ![image](https://user-images.githubusercontent.com/37413895/72660763-f6b62a80-3a36-11ea-836f-e5679a97b8c5.png)
Yamboy1 commented 2020-01-18 09:56:02 +01:00 (Migrated from github.com)

There are a couple of concerns I have with the text viewer. Big files, like lbry://csv, take ages to load and cause the app to stop responding and lbry.tv just hangs for a while. This isn't due to my changes, just due to how the text viewer works in general

There are a couple of concerns I have with the text viewer. Big files, like `lbry://csv`, take ages to load and cause the app to stop responding and lbry.tv just hangs for a while. This isn't due to my changes, just due to how the text viewer works in general
Yamboy1 commented 2020-01-20 20:24:45 +01:00 (Migrated from github.com)

I think I may have messed up the history a bit, not sure what happened there, but other than that, finished the pr.

I think I may have messed up the history a bit, not sure what happened there, but other than that, finished the pr.
neb-b commented 2020-01-20 20:44:10 +01:00 (Migrated from github.com)

Thanks @Yamboy1

I'll give this a closer look once we get the release out.

Thanks @Yamboy1 I'll give this a closer look once we get the release out.
neb-b commented 2020-01-20 20:44:57 +01:00 (Migrated from github.com)

To fix the history/extra changes, you need to rebase against the master branch git rebase upstream/master

To fix the history/extra changes, you need to rebase against the master branch `git rebase upstream/master`
Yamboy1 commented 2020-01-20 20:52:37 +01:00 (Migrated from github.com)

Think i got it!

Think i got it!
neb-b commented 2020-01-23 21:48:10 +01:00 (Migrated from github.com)

Great. I'll give this a closer review tomorrow.

Great. I'll give this a closer review tomorrow.
neb-b (Migrated from github.com) requested changes 2020-01-24 19:40:28 +01:00
neb-b (Migrated from github.com) left a comment

A couple comments. The new code theme looks way better!!

A couple comments. The new code theme looks way better!!
neb-b (Migrated from github.com) commented 2020-01-24 19:37:59 +01:00

There are some files that will still have the text mediaType. Just add script to the end without removing text

There are some files that will still have the `text` `mediaType`. Just add `script` to the end without removing `text`
@ -106,1 +105,4 @@
max-width: 100%;
min-width: 40em;
width: fit-content;
margin: auto;
neb-b (Migrated from github.com) commented 2020-01-24 19:39:31 +01:00

I don't think this should change. If it needs to be wider for non-markdown files we can do that, but for the most part, text files should have a static width like 40em

I don't think this should change. If it needs to be wider for non-markdown files we can do that, but for the most part, text files should have a static width like `40em`
Yamboy1 commented 2020-01-26 22:35:55 +01:00 (Migrated from github.com)

If someone else wants to pick this up, i'm leaving the branch open

If someone else wants to pick this up, i'm leaving the branch open
Yamboy1 commented 2020-01-29 04:43:27 +01:00 (Migrated from github.com)

Will keep working on this

Will keep working on this
Yamboy1 (Migrated from github.com) reviewed 2020-01-29 18:37:11 +01:00
Yamboy1 (Migrated from github.com) commented 2020-01-29 18:37:10 +01:00
https://github.com/lbryio/lbry-desktop/pull/3511/commits/c063ee9cfb7428314a50dd53a6b886946068aaaf
Yamboy1 (Migrated from github.com) reviewed 2020-01-29 18:37:22 +01:00
@ -106,1 +105,4 @@
max-width: 100%;
min-width: 40em;
width: fit-content;
margin: auto;
Yamboy1 (Migrated from github.com) commented 2020-01-29 18:37:21 +01:00
https://github.com/lbryio/lbry-desktop/pull/3511/commits/eeaa550a3715a96c47d638b58d269dc492893886
neb-b (Migrated from github.com) requested changes 2020-01-31 19:25:10 +01:00
neb-b (Migrated from github.com) left a comment

Happy to see you are picking this back up!

Happy to see you are picking this back up!
neb-b (Migrated from github.com) commented 2020-01-31 19:24:58 +01:00

Generally the pattern we have been following is this:

<div className={classNames('main__document-wrapper', { 'main__document-wrapper--markdown': isMd })}>

Where main__document-wrapper is the default style, then add any overrides to the class with --markdown.

Generally the pattern we have been following is this: ``` <div className={classNames('main__document-wrapper', { 'main__document-wrapper--markdown': isMd })}> ``` Where `main__document-wrapper` is the default style, then add any overrides to the class with `--markdown`.
Yamboy1 (Migrated from github.com) reviewed 2020-02-01 02:48:30 +01:00
Yamboy1 (Migrated from github.com) commented 2020-02-01 02:48:30 +01:00

Thanks

Thanks
Yamboy1 commented 2020-02-01 02:48:53 +01:00 (Migrated from github.com)

I'm a bit dissatisified by the dark theme, so I might make a few tweaks there before this gets merged

I'm a bit dissatisified by the dark theme, so I might make a few tweaks there before this gets merged
neb-b commented 2020-02-05 21:29:00 +01:00 (Migrated from github.com)

@Yamboy1 Should I review this or are you still planning to do more work with the dark theme? Happy to review or wait.

@Yamboy1 Should I review this or are you still planning to do more work with the dark theme? Happy to review or wait.
Yamboy1 commented 2020-02-05 21:50:14 +01:00 (Migrated from github.com)

Sorry, I've been real busy with school and stuff recently. I'll get onto it

Sorry, I've been real busy with school and stuff recently. I'll get onto it
Yamboy1 commented 2020-02-06 01:48:13 +01:00 (Migrated from github.com)

Should be good to merge now 😄

Should be good to merge now :smile:
Yamboy1 commented 2020-02-06 01:48:21 +01:00 (Migrated from github.com)

wait

wait
Yamboy1 commented 2020-02-06 02:08:00 +01:00 (Migrated from github.com)

Seems good

Seems good
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#3511
No description provided.