-
Notifications
You must be signed in to change notification settings - Fork 154
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
[#467] Add Title Component #2102
Merged
Merged
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
8cc525f
Add title component
sopa301 a223766
Remove testing code
sopa301 31ef993
Add handling for invalid files
sopa301 0511528
Update package-lock
sopa301 caeee3c
Remove extra component usage
sopa301 6f6251c
Remove console statement
sopa301 5157f59
Remove faulty package-lock
sopa301 39c5d07
Add test title
sopa301 d726113
Add EOL
sopa301 14b6d34
Merge branch 'master' of https://github.com/sopa301/RepoSense into 46…
sopa301 b3343dc
Fix scrolling and test bugs
sopa301 0ff36c5
Fix line length
sopa301 bcdacef
Merge branch 'master' into 467-add-intro
sopa301 b3fdd84
Make title load from --assets folder
sopa301 293ad11
Make title path more general
sopa301 08e3934
Merge branch 'master' of https://github.com/sopa301/RepoSense into 46…
sopa301 05ef0ca
Remove test file
sopa301 a00e09e
Fix minor styling error
sopa301 434bca3
Update CLI reference
sopa301 610ab95
Add borders
sopa301 ffd05c0
Fix bug
sopa301 1324cc0
Update docs/ug/cli.md
sopa301 fdbdc0e
Add handling for unexpected error
sopa301 b7b002f
Merge branch '467-add-intro' of https://github.com/sopa301/RepoSense …
sopa301 6458fa2
Move title into left panel
sopa301 6ca0305
Fix style
sopa301 f7d7a6d
Update frontend/src/components/c-title.vue
sopa301 65fc7ea
Merge branch 'master' into 467-add-intro
ckcherry23 a083ef0
Remove unneeded code and fix promise bug
sopa301 2032cdc
Merge branch '467-add-intro' of https://github.com/sopa301/RepoSense …
sopa301 a19362d
Fix style
sopa301 644fd83
Remove unused code
sopa301 ae772a4
Add test
sopa301 e07a12e
Enable raw HTML
sopa301 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template lang="pug"> | ||
.title(v-html="markdownText", v-if="markdownText != ''") | ||
</template> | ||
|
||
<script lang="ts"> | ||
import MarkdownIt from 'markdown-it'; | ||
import { defineComponent } from 'vue'; | ||
|
||
export default defineComponent({ | ||
data() { | ||
return { | ||
markdownText: '', | ||
}; | ||
}, | ||
beforeMount() { | ||
try { | ||
fetch('title.md').then((response) => { | ||
if (!response.ok) { // file not found | ||
return ''; | ||
} | ||
return response.text(); | ||
}).then((text) => { | ||
const md = new MarkdownIt(); | ||
this.markdownText = md.render(text); | ||
}); | ||
} catch (error) { | ||
this.markdownText = (error as Error).toString(); | ||
vvidday marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.title { | ||
padding: 2rem 1.5rem; | ||
sopa301 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// This is needed because the parent summary-wrapper center aligns everything | ||
text-align: initial; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@sopa301 Noticed while passing: There should not be a line break here (in markdown files, we should not wrap lines to a specific 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.
@sopa301 Further comments:
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.
Also, perhaps add a title component to our preview dashboard?
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.
Thanks for the review prof, I'll work on it!