help_center 0.0.1 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +12 -12
  3. data/.gitignore +10 -10
  4. data/CHANGELOG.md +31 -1
  5. data/CODE_OF_CONDUCT.md +74 -74
  6. data/Gemfile +6 -6
  7. data/LICENSE.txt +1 -1
  8. data/README.md +24 -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 +43 -2
  12. data/app/controllers/help_center/support_threads_controller.rb +17 -7
  13. data/app/helpers/help_center/support_posts_helper.rb +1 -1
  14. data/app/helpers/help_center/support_threads_helper.rb +1 -1
  15. data/app/mailers/help_center/user_mailer.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 +19 -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 +39 -24
  24. data/app/views/help_center/support_posts/_support_post.html.erb +5 -13
  25. data/app/views/help_center/support_posts/edit.html.erb +2 -7
  26. data/app/views/help_center/support_threads/_form.html.erb +11 -18
  27. data/app/views/help_center/support_threads/_support_thread.html.erb +5 -10
  28. data/app/views/help_center/support_threads/edit.html.erb +1 -1
  29. data/app/views/help_center/support_threads/index.html.erb +4 -8
  30. data/app/views/help_center/support_threads/new.html.erb +1 -1
  31. data/app/views/help_center/support_threads/show.html.erb +10 -20
  32. data/app/views/help_center/user_mailer/new_post.html.erb +0 -3
  33. data/app/views/help_center/user_mailer/new_thread.html.erb +0 -3
  34. data/app/views/layouts/help_center.html.erb +58 -48
  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 +4 -0
  38. data/config/routes.rb +2 -2
  39. data/db/migrate/20170417012932_create_support_posts.rb +12 -12
  40. data/help_center.gemspec +6 -8
  41. data/lib/help_center.rb +1 -2
  42. data/lib/help_center/version.rb +1 -1
  43. metadata +16 -23
  44. data/.travis.yml +0 -5
  45. data/lib/help_center/will_paginate.rb +0 -53
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c7daa878339028e7a0e6bb67b3fd203f37c1f4a59070b27d8b1ea3439a902c9
4
- data.tar.gz: 5fc519dcf8bce60e626cefbbb1e9ccf65ea0375f64462772a7f89d7a347ba557
3
+ metadata.gz: 21d5abd35602e62d22607a377c4f63ecd1781e2260a390112183ec05b6467ae6
4
+ data.tar.gz: f052cf2fa537f50ca26823b6d3744e78457ab82841ec4fc914e33f24e5b5c711
5
5
  SHA512:
6
- metadata.gz: 6ba59c2c645c8687617f72e8e5eb7d5a874d31c824effdc7242d3d8ac1cd0dfeb98f0892a519354c3435ad4437dccbfdfb6645aa8316e947b20c4bb9af5c0366
7
- data.tar.gz: 3d991eec4b3b26bf78f937c879cda2040ab875f8a4a5a86d492ae276ef024139d7bab184c66a7efdea87b52a4bf90794e5a3595a6769d6ea1c43d038d8b6e6cc
6
+ metadata.gz: a3af90e3300fc85ecdba1ebea049b79c16f18afc31cd601965fce7f6e9d536e20f3f5cb505102351adbb3902bad8ea9b820f9e9796f01fbd44584dde7a28a5ad
7
+ data.tar.gz: 3145813c4bf4d9fbded2d73405c6b54bc1f7a42c25e956372bc74d1803543685e1a428f0bda7eec0ec15511d463cdb6ef649feee1133dd51c2a894cd4c585ce0
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,31 @@
1
-
1
+ ### Unreleased
2
+
3
+ ### 0.0.6
4
+
5
+ * Bug fixes
6
+ * Fix gemspec error
7
+ * Remove duplicate gem file
8
+ * Add changelog
9
+ * Add index page for categories
10
+ * Add descriptions to categories
11
+ * Change home page layout
12
+
13
+ ### 0.0.5
14
+
15
+ * [BREAKING] Remove Bootstrap in favor of TailwindCSS
16
+
17
+ ### 0.0.4
18
+
19
+ * Default CSS changes
20
+
21
+ ### 0.0.3
22
+
23
+ * Change article layout
24
+
25
+ ### 0.0.2
26
+
27
+ * Fix mailer errors
28
+
29
+ ### 0.0.1
30
+
31
+ * 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,13 +1,17 @@
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
 
11
+ ```
9
12
  Rails >= 6.0.0
10
- bootstrap >= 4.0.0
13
+ tailwindcss >= 2.0.0
14
+ ```
11
15
 
12
16
  ## Installation
13
17
 
@@ -59,7 +63,16 @@ if current_user.admin? || current_user.moderator?
59
63
  Add the following line to your `config/routes.rb` file:
60
64
 
61
65
  ```ruby
62
- 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"
63
76
  ```
64
77
 
65
78
  Lastly, add the CSS to your `application.css` to load some default styles.
@@ -129,16 +142,18 @@ Your support is appreciated for this project. Consider backing the project via G
129
142
  We plan to release following features:
130
143
 
131
144
  - Contact form
132
- - Ticket submission
133
- - Live chat
134
- - Help Center Layout templates
135
145
  - Built-in search
146
+ - Versioning Support
147
+ - Themes
148
+ - Dark Mode Support
136
149
 
137
150
  ## Acknowledgment
138
151
 
139
- 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)
140
155
 
141
- 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)
142
157
 
143
158
  ## Contributing
144
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
+