Skip to content
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

Refactor the codebase #86

Draft
wants to merge 57 commits into
base: master
Choose a base branch
from
Draft

Refactor the codebase #86

wants to merge 57 commits into from

Conversation

ewen-lbh
Copy link
Member

Resolves #62

@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #86 into master will decrease coverage by 3.17%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #86      +/-   ##
=========================================
- Coverage    4.28%   1.11%   -3.18%     
=========================================
  Files          60      32      -28     
  Lines        2169    1705     -464     
  Branches      605     524      -81     
=========================================
- Hits           93      19      -74     
+ Misses       1720    1330     -390     
  Partials      356     356              
Impacted Files Coverage Δ
components/BadgeSubject.vue 0.00% <0.00%> (-100.00%) ⬇️
components/BaseButton.vue 0.00% <0.00%> (ø)
components/BaseInput.vue 0.00% <0.00%> (ø)
components/ButtonIcon.vue 0.00% <0.00%> (ø)
components/ButtonPrimary.vue 0.00% <0.00%> (ø)
components/ButtonSecondary.vue 0.00% <0.00%> (ø)
components/CardHomework.vue 0.00% <0.00%> (-100.00%) ⬇️
components/TextLink.vue 0.00% <0.00%> (ø)
components/TimeTable.vue 0.00% <0.00%> (ø)
pages/login.vue 0.00% <0.00%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c7797e...a3a3992. Read the comment docs.

Sure, I _personally_ find pug way cleaner than HTML, but:

* the latter is much more supported and provides better integration in IDEs for .vue files
* it lowers the barrier to entry for people wanting to contribute (few people know pug)
Can't import typescript from javascript
- Renamed API resource types to prefix them with `ApiResource`, since `Event` is a builtin type
- Removed the default value of [event], which was only there for testing anyway, and didn't match the type because it lacked a UUID
- Put some (3) // @ts-ignore comments, one resolvable, the others need a fix from whoever defined `this.$el`'s type
By typecasting `this.$el` to an `HTMLElement`
The rationale is that the API uses the already well-established snake_case convention, so some variables will inevitably end up snakecase'd
`isURL` only validates complete URLS -- starting with a protocol. Since <TextLink> also supports internal links, this validator must be removed
There was almost nothing in common between the two and some ugly code was required to override <BaseCard>'s styles
Especially index.js, was full of shit that I split into multiple modules in `utils/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor to respect CONTRIBUTING.adoc
1 participant