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

[WIP] Add / remove declaration in preview #11

Merged
merged 6 commits into from
Mar 21, 2018
Merged

[WIP] Add / remove declaration in preview #11

merged 6 commits into from
Mar 21, 2018

Conversation

ktsn
Copy link
Owner

@ktsn ktsn commented Mar 19, 2018

This PR allows the users to add or remove css declaration in preview.

I've only implemented the code modifier to add / remove declaration code yet. I'll make it works in the preview as well later.

Also, it would be needed to update css codegen to output pretty code since we may use it for modifying the original code.

@codecov
Copy link

codecov bot commented Mar 21, 2018

Codecov Report

Merging #11 into master will decrease coverage by 0.76%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
- Coverage   63.85%   63.09%   -0.77%     
==========================================
  Files          40       40              
  Lines        1256     1306      +50     
  Branches      308      313       +5     
==========================================
+ Hits          802      824      +22     
- Misses        441      467      +26     
- Partials       13       15       +2
Impacted Files Coverage Δ
src/view/components/PageMain.vue 0% <ø> (ø) ⬆️
src/parser/style/codegen.ts 88.88% <ø> (ø) ⬆️
src/view/components/StyleInformation.vue 0% <0%> (ø) ⬆️
src/server/main.ts 0% <0%> (ø) ⬆️
src/message/bus.ts 0% <0%> (ø) ⬆️
src/view/components/StyleValue.vue 100% <100%> (ø) ⬆️
src/parser/modifier.ts 88.46% <100%> (+0.46%) ⬆️
src/view/store/modules/project.ts 39.58% <20%> (-1.14%) ⬇️
src/parser/style/transform.ts 83.51% <83.33%> (-0.02%) ⬇️
src/parser/style/modify.ts 89.47% <89.47%> (-10.53%) ⬇️

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 d0dbac0...f5b9a26. Read the comment docs.

@ktsn ktsn mentioned this pull request Mar 21, 2018
6 tasks
@ktsn ktsn merged commit f7e48fe into master Mar 21, 2018
@ktsn ktsn deleted the add-declaration branch March 21, 2018 12:34
ktsn added a commit that referenced this pull request Mar 21, 2018
* refactor: DeclarationUpdater -> DeclarationForUpdate

* chore: add `before` and `after` property in style node

* chore: add a helper to remove declaration

* chore: modify declaration to insert or remove

* feat: remove declaration from the code when its value is updated to empty in preview

* feat: add declaration when any area of rule element is clicked
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.

None yet

1 participant