-
Notifications
You must be signed in to change notification settings - Fork 94
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(files): create suggestions bar #6856
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6856 +/- ##
==========================================
- Coverage 46.68% 46.61% -0.07%
==========================================
Files 750 730 -20
Lines 34528 34615 +87
Branches 1269 1249 -20
==========================================
+ Hits 16118 16137 +19
- Misses 17788 17877 +89
+ Partials 622 601 -21 ☔ View full report in Codecov by Sentry. |
a1dc138
to
ebc2d27
Compare
@@ -612,6 +616,7 @@ export default { | |||
this.emit('update:content', { | |||
markdown: proseMirrorMarkdown, | |||
}) | |||
this.isEmptyContent = editor.state.doc.nodeSize <= 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the background for that fixed number of 4? I'd assume we can also check the text content length directly? Or the resulting markdown length?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text content length is checked by the count of nodeSize
from editor.state.doc
, checked with Max
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text content length is checked by the count of nodeSize from editor.state.doc
Yes, that is what the code does. I would still be curious about the reasoning, this is not obvious. I assume there is one ...
@@ -58,6 +58,7 @@ | |||
</template> | |||
<ContentContainer v-show="contentLoaded" | |||
ref="contentWrapper" /> | |||
<SuggestionsBar v-if="isEmptyContent && contentLoaded" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should only be shown if a markdown file is edited, not for plain text files (e.g. .txt
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from the call i understood that SuggestionsBar should be shown if markdown file is not edited (empty). What should i use instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you create a .txt
file or upload any other code file (like .js
or .php
) and open it we will not have any rich text editing, so the options there do not make sense. There is also no menu bar. Let's just not show any suggestions in this case.
bc78ba4
to
bcbb1d0
Compare
/rebase |
@marcoambrosini could you please have a look into current state? Thank you! |
bcbb1d0
to
1c4e1c3
Compare
@JuliaKirschenheuter No need to commit the bundle js files in this repo, they get updated once merged. |
Signed-off-by: julia.kirschenheuter <[email protected]>
1c4e1c3
to
d8a7b03
Compare
📝 Summary
🖼️ Screenshots
🏚️ Before
🏡 After