Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Break resources in multiple json files & add to vuex module store #91

Merged
merged 35 commits into from
Sep 30, 2019

Conversation

S3B4S
Copy link
Collaborator

@S3B4S S3B4S commented Jun 22, 2019

I couldn't sleep so I decide to go ahead and do this, based on feature-i18n branch which was already using vuex store.

Relates to #52

⚠️ Please note that there are several changes included from the features-i18n branch in here (which aren't necessary for my features). If these are undesired let me know.

TODO

@S3B4S S3B4S requested a review from lostdesign June 22, 2019 01:32
@S3B4S S3B4S changed the title Break resources in multiple json files & add to vuex module store [WIP]Break resources in multiple json files & add to vuex module store Jun 22, 2019
@S3B4S S3B4S changed the title [WIP]Break resources in multiple json files & add to vuex module store [WIP] Break resources in multiple json files & add to vuex module store Jun 22, 2019
@S3B4S S3B4S changed the base branch from feature-i18n to dev August 9, 2019 03:31
@S3B4S S3B4S changed the base branch from dev to master August 9, 2019 03:36
@S3B4S S3B4S changed the base branch from master to dev August 9, 2019 03:40
@S3B4S S3B4S changed the title [WIP] Break resources in multiple json files & add to vuex module store Break resources in multiple json files & add to vuex module store Aug 9, 2019
@S3B4S
Copy link
Collaborator Author

S3B4S commented Sep 5, 2019

  • Broke down the store.json in multiple files under resources/ that are then imported into vuex.
  • Support for tags also implemented (store wise, not yet in the UI, would need to fill the tags in first)
  • There are some i18n features from the beginning that are unfinished, but I propose we pick that up in a new PR.

The only thing that I wish to see changed is the UI of the toggle.
Other than that it can be merged!

}
</script>


<style lang="scss" scoped>
.cardActive {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing .cardActive we could continue with sass and do:

&Active {
    box-shadow:inset 0px 0px 0px 3px #08e5ff;
}

I'd prefer it that way, to keep a consistent structure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

export default {
data() {
return {
categories: [{ slug: '', title: '' }],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well i guess we should define now if single or double quotes - the codebase is already mixed with both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we should do this when we implement Prettier, I think I want to do this as the next thing.

@@ -0,0 +1,38 @@
<template lang="pug">
tr.tableHead
th.tableHead--title {{title}}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to this, i realised myself that we apply BEM wrong? Did i always do that :D ?

It's .block__element--modifier 🤔 And I guess I also did .block--element___modifier.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess? I haven't touched CSS at all, I'll leave the BEM changes up to you

.cards
template(v-for='resource in category.resources')
Card(:title='resource.title' :desc='resource.desc' :url='resource.url')
.cards(v-if="cardsShown")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename from cardsShown to cardsAreVisible ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think the naming could use some improvements in several places, I've updated this

store/Sidebar.js Outdated
})

export const getters = {
isCardsShown: state => state.cardsShown
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comment, cardsAreVisible.

This was referenced Sep 6, 2019
@lostdesign
Copy link
Owner

So sorry, what is the current state of this? I kinda lost track to be honest.

@S3B4S
Copy link
Collaborator Author

S3B4S commented Sep 21, 2019

It's ready to merge, but the UI component (toggle for table/card view) needs to be updated. If you don't have time for that just comment it out & add it back in later.

@lostdesign
Copy link
Owner

I will adjust that part tomorrow, just slight modifications are necessary. So merge shall happen tomorrow :)

@lostdesign lostdesign merged commit 29828d7 into dev Sep 30, 2019
@S3B4S S3B4S deleted the features/resources-store branch October 15, 2019 10:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants