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

Fix theme path issue #3048

Merged
merged 6 commits into from
Jul 17, 2019
Merged

Fix theme path issue #3048

merged 6 commits into from
Jul 17, 2019

Conversation

AWolf81
Copy link
Contributor

@AWolf81 AWolf81 commented May 30, 2019

Description

  • Changed path usage with-out ../
  • Change development check on process.env - not perfect but that way we're getting production stuff if NODE_ENV is not defined. I think we can fix / improve that once we improved the build process.

Interface theming had a path issue as mentioned in the issue.
Editor theming should be fixed as well.

Issue fixed

#3018, #3042

Type of changes

  • 🔘 Bug fix (Change that fixed an issue)
  • ⚪ Breaking change (Change that can cause existing functionality to change)
  • ⚪ Improvement (Change that improves the code. Maybe performance or development improvement)
  • ⚪ Feature (Change that adds new functionality)
  • ⚪ Documentation change (Change that modifies documentation. Maybe typo fixes)

Checklist:

  • 🔘 My code follows the project code style
  • ⚪ I have written test for my code and it has been tested
  • 🔘 All existing tests have been passed
  • 🔘 I have attached a screenshot/video to visualize my change if possible

Screenshot

grafik

Error message
grafik

Questions / notes

  • Please double check the editor theming.
  • Error message (see screenshot) - why do I get it?

Tested

  • LinuxMint 19.1 (4.15.0-50 Linux) - Dev server & binary - theme switching OK
  • Windows 10 64bit - Dev server & binary - theme switching OK
  • MacOs High Sierra (10.13.6) - Theme switching OK - tested by incredibleweirdo

@AWolf81
Copy link
Contributor Author

AWolf81 commented May 30, 2019

Seems like there is an issue on Linux. Tested with Ubuntu 18 and css not found - I need to do more debugging here.

Update
Fixed theming for Linux binary. I couldn't test the dev server in Ubuntu because it wasn't starting - no error it was just the stopped loading spinner. Will check this later.

@incredibleweirdo
Copy link

incredibleweirdo commented May 30, 2019

Hello,
I have tested on Windows 7 and macOS High Sierra (10.13.6), and can confirm themes now work as intended.
As I was guessing this was related to #2968 based on the fix discussed in #3018 making export usable, I tested that as well and found it is now solved in Windows 7 with this change; but still broken in macOS. I can capture console output and screenshots if that is helpful.

Edited to add:
I believe this breaks export on macOS.
If I yarn run dev from master or v0.11.16, I'm able to export on macOS without issue. With the branch from this PR, export on macOS does not work.
However, themes do work as expected, but themes also work on macOS before this change in my testing.

On Windows 7, master and v0.11.16 have the bug with themes not working, AND have export not working. The branch from this PR have themes working and export working.

I have a Linux machine at home I can test with tomorrow.

return `${appPath}/node_modules/codemirror/theme/elegant.css`
}
return theme
? (win ? theme.path : `../${theme.path}`)

Choose a reason for hiding this comment

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

I think this is what it needs to be for macOS:

Suggested change
? (win ? theme.path : `../${theme.path}`)
? (win ? theme.path : `${appPath}/${theme.path}`)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, changed this & tested it with Ubuntu binary. Theming (Editor, in preview code block & app theme) is working.

@amedora amedora mentioned this pull request May 31, 2019
@@ -141,7 +140,7 @@ function get () {
const theme = consts.THEMES.find(theme => theme.name === config.editor.theme)

if (theme) {
editorTheme.setAttribute('href', `../${theme.path}`)
editorTheme.setAttribute('href', win ? theme.path : `../${theme.path}`)
Copy link
Contributor Author

@AWolf81 AWolf81 May 31, 2019

Choose a reason for hiding this comment

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

@incredibleweirdo Is this working on Mac? Just wondering because if the other change in MarkdownPreview was required then we should change every occurence from ../ to the absolute path.
But if it's working we can also keep it.

Choose a reason for hiding this comment

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

Yeah, changing themes appears to work fine.

@amedora
Copy link
Contributor

amedora commented Jun 11, 2019

tested on Win7/64 and confirmed that problems described in #3018 and #3042 has resolved.

@ZeroX-DG ZeroX-DG added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed awaiting review ❇️ Pull request is awaiting a review. labels Jun 13, 2019
@Flexo013
Copy link
Contributor

Flexo013 commented Jul 1, 2019

@Rokt33r Could this pull request be added to the upcoming milestone/release? https://github.com/BoostIO/Boostnote/milestone/6

There are a lot of likes that have been given to issues that would be fixed by this PR, so I think it's only logical for this to have a fairly high priority.

@elliptic-shiho
Copy link

@Rokt33r Boostnote couldn't boost my work due to this issue... so I hope you to fix this problem with high priority (Yes, This issue can fix by dirty hack, but I'll not to use it because dislike dirty hack).

@Rokt33r Rokt33r removed the awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. label Jul 17, 2019
@Rokt33r Rokt33r added this to the v0.12.0 milestone Jul 17, 2019
@Rokt33r Rokt33r merged commit 782d71d into BoostIO:master Jul 17, 2019
@Flexo013 Flexo013 mentioned this pull request Jul 17, 2019
@Flexo013 Flexo013 mentioned this pull request Jul 22, 2019
@byegates
Copy link

When is this fix (0.12.0) going to be available for public?

@AWolf81 AWolf81 deleted the fix-themes branch July 22, 2019 20:38
@Rokt33r
Copy link
Member

Rokt33r commented Jul 23, 2019

@byegates tomorrow. :)

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.

8 participants