-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add the ability to group routes #42
Conversation
This looks wicked @JDansercoer!! I will take a look and review over the weekend 🙇 👍 |
Codecov Report
@@ Coverage Diff @@
## 1.1.0 #42 +/- ##
==========================================
- Coverage 97.76% 94.23% -3.54%
==========================================
Files 7 19 +12
Lines 134 260 +126
Branches 28 47 +19
==========================================
+ Hits 131 245 +114
- Misses 3 15 +12 |
Thanks for this @JDansercoer, a great feature and thanks so much for contributing to the project 🙏 . I am aiming for a 1.1.0 release, which this will part of, I'm going to write up some docs for the feature too. FYI I made a few changes:
Overall, awesome feature thanks! I will add you to the contributing list too :) |
All right, awesome! We'll probably be using mockit a lot, so I'll try to expand other features where I deem needed! |
* Add the ability to group routes (#42) * First version of grouping routes * Switched to new calculation of groups and styled them * Added group routing based on togglable state * Updated package-lock * DB - Moved some components around, added some tests and fixed jest running tests * DB - Added more test coverage * Removed useless header x-powered-by (#45) * Improved methods and status codes (#44) * DB - Fixing tests for new routes that were added as part of #44 * Added CHANGELOG * Feature - Add support for adding headers onto responses (#46) * Started to add custom headers * Tmp * #4 - Added the ability to add headers in the routes * Updated CHANGELOG * DB - Format of settings * Updated version
What:
BEFORE
AFTER
Why:
We would be using mockit for a plethora of services spread across multiple teams. With no grouping whatsoever it would quickly become a huge mess.
With the ability to group routes, you can quickly hide a whole list of routes that share the same basepath (e.g. you decide on a basepath per team).
How:
Added a checkbox to enable grouping.
If it is enabled, all routes will be grouped by their URL, and will be displayed in a parent-child relationship, depicted by indentation.
I also had to remove the scrollreveal for the routes itself, because the revealing was super bugged when working with the
<detail>
tag.I also added
styled-components
for more precise styling, so future front-end additions can be done in JS only.I also split up the route files a little bit more, to ensure a one component per file approach.
Checklist:
I have currently not added tests, as I'm not entirely sure what the front-end testing approach is. If you can elaborate on that, I'll happily add them!