mirror of
https://github.com/snibox/snibox.git
synced 2026-04-25 15:56:04 +03:00
[PR #43] [MERGED] Add multiple files per snippet #70
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/snibox#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/snibox/snibox/pull/43
Author: @GWillmann
Created: 4/8/2019
Status: ✅ Merged
Merged: 5/31/2019
Merged by: @vavgustov
Base:
master← Head:pr/add-files-to-snippets📝 Commits (10+)
eef5eabAdd multiple files per snippet7a8808fMerge branch 'pr/add-files-to-snippets' of https://github.com/Kinoba/snibox into Kinoba-pr/add-files-to-snippets98779e6Replaces chromedriver-helper gem by webdrivers gembf4d058Snippet files improvements0c407ffMerge branch 'pr/add-files-to-snippets' of https://github.com/Kinoba/snibox into Kinoba-pr/add-files-to-snippets7d83d4cUse 'main' as default file name for snippet -> snippet file conversion.ecd2794Make collapsible link more simple. Remove semicolons.118bb1aFixed markdown view and copy to clipboard for show mode. Various experimental UI improvements for show mode.cd199c8Fixed language syntax highlighting for markdown files. Fixed copy to clipboard for collapsed files.ad53f56One more fix for collapsed + copy workflow.📊 Changes
46 files changed (+886 additions, -257 deletions)
View changed files
📝
Gemfile(+1 -1)📝
Gemfile.lock(+5 -7)📝
app/controllers/api/v1/data_controller.rb(+4 -1)📝
app/controllers/api/v1/snippets_controller.rb(+7 -2)📝
app/javascript/packs/common.js(+3 -0)📝
app/javascript/snibox/api/backend.js(+22 -9)➕
app/javascript/snibox/components/CollapsibleControls.vue(+41 -0)📝
app/javascript/snibox/components/Repository.vue(+4 -0)📝
app/javascript/snibox/components/SearchBox.vue(+6 -5)📝
app/javascript/snibox/components/snippet/Form.vue(+61 -65)📝
app/javascript/snibox/components/snippet/Show.vue(+26 -68)➕
app/javascript/snibox/components/snippet_file/Form.vue(+184 -0)➕
app/javascript/snibox/components/snippet_file/Show.vue(+112 -0)📝
app/javascript/snibox/mixins/editor.js(+2 -2)📝
app/javascript/snibox/mixins/factory.js(+8 -4)📝
app/javascript/snibox/store/helpers.js(+18 -7)📝
app/javascript/snibox/store/mutations.js(+46 -7)📝
app/javascript/snibox/store/state.js(+5 -4)📝
app/javascript/snibox/utils/highlighter_helper.js(+2 -3)📝
app/javascript/snibox/utils/notifications.js(+2 -2)...and 26 more files
📄 Description
What an awesome project Snibox is! I hope my contribution make it even better.
This PR adds support of multiple files per snippet.
We needed this kind of feature at Kinoba and I saw that several people wanted it also
I added the following model:
SnippetFilewhich belong_to aSnippet.Also I was inspired by GitHub's snippet system and I replace the Snippet title by a description.
I also changed the tests according to the new structure and added new ones:
I am not extremely happy with the design I came up when one edits a
Snippet, if you guys have some suggestions I'd be happy to change it.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.