help_center 0.0.3 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +12 -12
  3. data/.gitignore +10 -10
  4. data/CHANGELOG.md +35 -1
  5. data/CODE_OF_CONDUCT.md +74 -74
  6. data/Gemfile +6 -6
  7. data/LICENSE.txt +1 -1
  8. data/README.md +22 -9
  9. data/app/assets/stylesheets/help_center.scss +39 -18
  10. data/app/controllers/help_center/application_controller.rb +3 -3
  11. data/app/controllers/help_center/support_categories_controller.rb +42 -5
  12. data/app/controllers/help_center/support_posts_controller.rb +4 -2
  13. data/app/controllers/help_center/support_threads_controller.rb +83 -72
  14. data/app/helpers/help_center/support_posts_helper.rb +1 -1
  15. data/app/helpers/help_center/support_threads_helper.rb +1 -1
  16. data/app/models/support_category.rb +3 -0
  17. data/app/views/help_center/support_categories/_form.html.erb +39 -0
  18. data/app/views/help_center/support_categories/_support_thread.html.erb +25 -0
  19. data/app/views/help_center/support_categories/edit.html.erb +7 -0
  20. data/app/views/help_center/support_categories/index.html.erb +21 -0
  21. data/app/views/help_center/support_categories/new.html.erb +5 -0
  22. data/app/views/help_center/support_categories/show.html.erb +19 -0
  23. data/app/views/help_center/support_posts/_form.html.erb +47 -47
  24. data/app/views/help_center/support_posts/_support_post.html.erb +57 -57
  25. data/app/views/help_center/support_posts/edit.html.erb +23 -23
  26. data/app/views/help_center/support_threads/_form.html.erb +49 -47
  27. data/app/views/help_center/support_threads/_support_thread.html.erb +25 -25
  28. data/app/views/help_center/support_threads/edit.html.erb +1 -1
  29. data/app/views/help_center/support_threads/index.html.erb +0 -19
  30. data/app/views/help_center/support_threads/new.html.erb +1 -1
  31. data/app/views/help_center/support_threads/show.html.erb +29 -1
  32. data/app/views/help_center/user_mailer/new_post.html.erb +9 -9
  33. data/app/views/help_center/user_mailer/new_thread.html.erb +9 -9
  34. data/app/views/layouts/help_center.html.erb +130 -104
  35. data/app/views/shared/_category_actions.html.erb +16 -0
  36. data/app/views/shared/_thread_actions.html.erb +16 -0
  37. data/config/locales/en.yml +6 -0
  38. data/config/routes.rb +2 -2
  39. data/db/migrate/20170417012932_create_support_posts.rb +12 -12
  40. data/help_center.gemspec +5 -7
  41. data/lib/help_center.rb +1 -2
  42. data/lib/help_center/version.rb +1 -1
  43. metadata +15 -24
  44. data/.travis.yml +0 -5
  45. data/app/views/help_center/support_threads/_article.html.erb +0 -32
  46. data/help_center-0.0.1.gem +0 -0
  47. data/lib/help_center/will_paginate.rb +0 -53
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f6c9fe1c740ee37600538f47459a923864d982d05cc5d43b9831996d6929d7d
4
- data.tar.gz: 345a03e89686432b20b68aa40a8fbaa9f1e1c9efc83f87cc27f827a71cdfb16a
3
+ metadata.gz: f3534b830bdcd003af94acb86f4cae1d8f280cdd2a8c35fcf819e1cdd1ecaac0
4
+ data.tar.gz: 29487d7779e372d63f2406e42de48aa75a0853d26062621657689b2d4c7871f8
5
5
  SHA512:
6
- metadata.gz: 603ce4a8a89f20b7af0815ef80d00c4f098ad13a0305158e3641634bded0659aa352e0c2f41326c0b64bb04b2fed94275f47d2f9cdc072af0da6b4c208dd63d8
7
- data.tar.gz: 5f92da7cf0a359f0ad4b646af71f6f59ead8a38a2ea6dc33d92ff4cec0bcddc834cdea15cb884b3a1d0c00843565a65ed40cf808f3bba486357cf73046af54b4
6
+ metadata.gz: 72da7820d7f986691f5cb18b223968317481aab512ff1e124fb056a9f64b707db998c4cbbf19ac25ac069e011bb3d2d6122d24f138e72a0cf52839664e7e45d8
7
+ data.tar.gz: 35f13cb0c78fcd1caf348d5cd0d4dde93af1b75e384923ca8a562e65cb00a11e328658a60eaeeffe7d806e5fde97d343abfc4b2b6ed53ead1073a6ad8b39a184
data/.github/FUNDING.yml CHANGED
@@ -1,12 +1,12 @@
1
- # These are supported funding model platforms
2
-
3
- github: [uurcankaya, pasilobus] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: # Replace with a single Ko-fi username
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- otechie: # Replace with a single Otechie username
12
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
1
+ # These are supported funding model platforms
2
+
3
+ github: [uurcankaya, pasilobus] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
data/.gitignore CHANGED
@@ -1,10 +1,10 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .DS_Store
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .DS_Store
data/CHANGELOG.md CHANGED
@@ -1 +1,35 @@
1
-
1
+ ### Unreleased
2
+
3
+ ### 0.0.7
4
+
5
+ * Improve default styling
6
+
7
+ ### 0.0.6
8
+
9
+ * Bug fixes
10
+ * Fix gemspec error
11
+ * Remove duplicate gem file
12
+ * Add changelog
13
+ * Add index page for categories
14
+ * Add descriptions to categories
15
+ * Change home page layout
16
+
17
+ ### 0.0.5
18
+
19
+ * [BREAKING] Remove Bootstrap in favor of TailwindCSS
20
+
21
+ ### 0.0.4
22
+
23
+ * Default CSS changes
24
+
25
+ ### 0.0.3
26
+
27
+ * Change article layout
28
+
29
+ ### 0.0.2
30
+
31
+ * Fix mailer errors
32
+
33
+ ### 0.0.1
34
+
35
+ * Initial release
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,74 +1,74 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at excid3@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at excid3@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in simple_discussion.gemspec
6
- gemspec
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in simple_discussion.gemspec
6
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Ugurcan Kaya
3
+ Copyright (c) 2021 Ugurcan Kaya
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,14 +1,16 @@
1
1
  # HelpCenter
2
2
 
3
- HelpCenter is a Rails wiki gem with Trix editor support for organizing app documentation and tutorials. It includes support categories, support articles, simple moderation, the ability to leave comments to support articles and more.
3
+ ### 📖 Knowledge Base for your Ruby on Rails App
4
4
 
5
- Out of the box, HelpCenter comes with styling for Boostrap v4 but you're free to customize the UI as much as you like by installing the views and tweaking the HTML.
5
+ HelpCenter is a Rails wiki gem with Trix editor support for creating a knowledge base for your project. It includes support categories, support articles, simple moderation, the ability to leave comments to support articles and more.
6
+
7
+ Out of the box, HelpCenter comes with styling for TailwindCSS 2.0 but you're free to customize the UI as much as you like by installing the views and tweaking the HTML.
6
8
 
7
9
  ## Requirements
8
10
 
9
11
  ```
10
12
  Rails >= 6.0.0
11
- bootstrap >= 4.0.0
13
+ tailwindcss >= 2.0.0
12
14
  ```
13
15
 
14
16
  ## Installation
@@ -61,7 +63,16 @@ if current_user.admin? || current_user.moderator?
61
63
  Add the following line to your `config/routes.rb` file:
62
64
 
63
65
  ```ruby
64
- mount HelpCenter::Engine => "/support"
66
+ mount HelpCenter::Engine => "/docs"
67
+ ```
68
+
69
+ Add routes for active storage with your custom prefix
70
+
71
+ ```ruby
72
+ get "/support/rails/active_storage/blobs/:signed_id/*filename" =>
73
+ "active_storage/blobs#show"
74
+ get "/support/rails/active_storage/representations/:signed_blob_id/:variation_key/*filename" =>
75
+ "active_storage/representations#show"
65
76
  ```
66
77
 
67
78
  Lastly, add the CSS to your `application.css` to load some default styles.
@@ -131,16 +142,18 @@ Your support is appreciated for this project. Consider backing the project via G
131
142
  We plan to release following features:
132
143
 
133
144
  - Contact form
134
- - Ticket submission
135
- - Live chat
136
- - Help Center Layout templates
137
145
  - Built-in search
146
+ - Versioning Support
147
+ - Themes
148
+ - Dark Mode Support
138
149
 
139
150
  ## Acknowledgment
140
151
 
141
- HelpCenter generated from the awesome [simple_discussion](https://github.com/excid3/simple_discussion) gem by [Chris Oliver](https://github.com/excid3)
152
+ [simple_discussion](https://github.com/excid3/simple_discussion) by [Chris Oliver](https://github.com/excid3)
153
+
154
+ [Trix editor](https://github.com/basecamp/trix) by [Basecamp](https://github.com/basecamp)
142
155
 
143
- HelpCenter uses [Trix editor](https://github.com/basecamp/trix) by [Basecamp](https://github.com/basecamp)
156
+ [TailwindCSS](https://github.com/basecamp/trix) by [Tailwind Labs](https://github.com/tailwindlabs/tailwindcss)
144
157
 
145
158
  ## Contributing
146
159
 
@@ -2,24 +2,25 @@
2
2
  @import "font-awesome";
3
3
 
4
4
  /* Allow pagination to be centered */
5
- .support-threads-nav nav {
5
+ .help_center .support-threads-nav nav {
6
6
  display: inline-block;
7
7
  }
8
8
 
9
9
  /* Highlight the active navigation item in the sidebar */
10
- .support-thread-filters {
10
+ .help_center .support-thread-filters {
11
11
  a {
12
12
  color: #555;
13
13
  }
14
14
 
15
15
  .active {
16
- color: #222;
17
- font-weight: bolder;
18
- }
16
+ color: #2a326d;
17
+ font-weight: 500;
18
+ padding: 0.25rem;
19
+ }
19
20
  }
20
21
 
21
22
  /* Formatting for the support threads */
22
- .support-thread {
23
+ .help_center .support-thread {
23
24
  margin-bottom: -20px;
24
25
 
25
26
  h4 {
@@ -34,18 +35,17 @@
34
35
  }
35
36
  }
36
37
 
37
- .support-thread-filters a {
38
+ .help_center .support-thread-filters a {
38
39
  color: #555555;
39
40
  display: block;
40
41
 
41
42
  &:hover {
42
- color: #222222;
43
- font-weight: bold;
43
+ color: #bfbfbf;
44
44
  text-decoration: none
45
45
  }
46
46
  }
47
47
 
48
- .thread-details {
48
+ .help_center .thread-details {
49
49
  color: #999;
50
50
  font-size: 12px;
51
51
  text-transform: uppercase;
@@ -53,7 +53,7 @@
53
53
  flex-direction: column;
54
54
  }
55
55
 
56
- .thread-reaction {
56
+ .help_center .thread-reaction {
57
57
  background: #eeeeee;
58
58
  padding: 1rem;
59
59
  text-align: center;
@@ -61,13 +61,13 @@
61
61
  margin-top: 2rem;
62
62
  }
63
63
 
64
- .thread-reaction-links {
64
+ .help_center .thread-reaction-links {
65
65
  font-size: 2rem;
66
66
  margin: 0.25rem;
67
67
  }
68
68
 
69
69
  /* Display the support post count above the "posts" text on the index page */
70
- .thread-posts-count {
70
+ .help_center .thread-posts-count {
71
71
  color: #222;
72
72
  text-align: center;
73
73
 
@@ -88,7 +88,7 @@
88
88
  }
89
89
 
90
90
  /* Formatting for the support posts themselves */
91
- .support-post {
91
+ .help_center .support-post {
92
92
  position: relative;
93
93
 
94
94
  /* When the URL anchor matches a post id, highlight that item */
@@ -112,8 +112,29 @@
112
112
  margin: 24px -20px;
113
113
  }
114
114
 
115
- .help_center .text-muted {
116
- color: #999;
117
- margin-top: 6px;
118
- font-size: 13px;
115
+ // Forms
116
+ .help_center label {
117
+ margin-bottom: 0.5rem;
119
118
  }
119
+
120
+ .help_center .form-input, .form-select {
121
+ display: block;
122
+ width: 100%;
123
+ font-size: 0.875rem;
124
+ line-height: 1.25rem;
125
+ }
126
+
127
+ .help_center input[type="color" i] {
128
+ appearance: square-button;
129
+ width: 44px;
130
+ height: 23px;
131
+ background-color: -internal-light-dark(rgb(239, 239, 239), rgb(74, 74, 74));
132
+ cursor: default;
133
+ border-width: 1px;
134
+ border-style: solid;
135
+ border-color: -internal-light-dark(rgb(118, 118, 118), rgb(195, 195, 195));
136
+ border-image: initial;
137
+ padding: 1px 2px;
138
+ }
139
+
140
+