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(split-pane): rendering order comes from the store.show-output #307

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

wangcch
Copy link
Collaborator

@wangcch wangcch commented Jan 23, 2025

[mobile] The store.showOutput configuration may not work when layoutReverse: true is configured.

image

Copy link

vercel bot commented Jan 23, 2025

@wangcch is attempting to deploy a commit to the vuejs Team on Vercel.

A member of the Team first needs to authorize it.

@yyx990803 yyx990803 force-pushed the main branch 2 times, most recently from 06a2e36 to 41d770d Compare February 3, 2025 04:06
@wangcch wangcch force-pushed the fix-split-panels-text branch from f07a3c7 to 0bd4c17 Compare February 13, 2025 05:10
@edison1105
Copy link
Member

Thanks for the PR, Maybe the following solution may be simpler, WDYT?

    <button class="toggler" @click="store.showOutput = !store.showOutput">
      {{
-         store.showOutput
+        (store.showOutput !== layoutReverse)
          ? splitPaneOptions?.codeTogglerText || '< Code'
          : splitPaneOptions?.outputTogglerText || 'Output >'
      }}
    </button>

@wangcch
Copy link
Collaborator Author

wangcch commented Feb 15, 2025

Thanks for the PR, Maybe the following solution may be simpler, WDYT?

    <button class="toggler" @click="store.showOutput = !store.showOutput">
      {{
-         store.showOutput
+        (store.showOutput !== layoutReverse)
          ? splitPaneOptions?.codeTogglerText || '< Code'
          : splitPaneOptions?.outputTogglerText || 'Output >'
      }}
    </button>

It is a good idea to fix text errors.

But store.showOuput is false. The expectation should be that the Preview is not displayed, right?

@edison1105
Copy link
Member

But store.showOuput is false. The expectation should be that the Preview is not displayed, right?

Ok, you are right. I forgot to test this earlier.

PR LGTM.

@edison1105 edison1105 added the bug Something isn't working label Feb 16, 2025
Copy link

pkg-pr-new bot commented Feb 16, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@vue/repl@307

commit: 0bd4c17

@edison1105 edison1105 merged commit b9a1593 into vuejs:main Feb 16, 2025
2 of 3 checks passed
@wangcch wangcch deleted the fix-split-panels-text branch February 18, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants