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 toolbar into v-authorship tab #566

Merged
merged 26 commits into from Mar 13, 2019
Merged

Conversation

ongspxm
Copy link
Contributor

@ongspxm ongspxm commented Feb 21, 2019

might affect #524 and #544

Currently the toolbar for the "expand/collapse all" text is outside of
the v-authorship tab. This shouldn't be the case as it makes it
difficult to extend and include other kinds of tabs.

Let's shift the toolbar into the v-authorship tab, and make some
corresponding changes to how the toggle state is changed.

This will keep the toolbar within the authorship tab, which makes sense
as the button is only relevant for the authorship tab. In light that we
are going to have other kinds of tabs to extend the use of the side tab
in the future.

@ongspxm ongspxm changed the title refactoring hows tabs works refactoring expandAll/ collapseAll toolbar for authorship Feb 21, 2019
@ongspxm ongspxm changed the title refactoring expandAll/ collapseAll toolbar for authorship refactoring to keep toolbar within v-authorship Feb 21, 2019
@ongspxm ongspxm requested review from apoorva17, chel-seyy, yamidark and yong24s and removed request for apoorva17 February 21, 2019 14:39
@ongspxm
Copy link
Contributor Author

ongspxm commented Feb 22, 2019

@apoorva17 could you check if there is any test case i missed?

Copy link
Contributor

@chel-seyy chel-seyy left a comment

Choose a reason for hiding this comment

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

image

The Expand/Collapse All tab does not seem to reflect the changes (files are already expanded)

frontend/src/index.jade Show resolved Hide resolved
@ongspxm
Copy link
Contributor Author

ongspxm commented Feb 26, 2019

The Expand/Collapse All tab does not seem to reflect the changes

image

@chelseyong which one is this? i tested everything seems fine. can you confirm this for the lastest netlify?

@ongspxm ongspxm removed the request for review from apoorva17 February 26, 2019 02:06
@@ -99,10 +99,11 @@ window.app = new window.Vue({

isLoading: false,
isCollapsed: false,

// isTabActive used to force tab wrapper to load
isTabActive: true,
Copy link
Member

Choose a reason for hiding this comment

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

perhaps inline the comments? E.g. isTabActive: true, // to force tab wrapper to load

},

updateCount() {
this.activeFileCount = document.getElementsByClassName('file active').length;
Copy link
Member

Choose a reason for hiding this comment

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

activeFilesCount

@@ -37,17 +37,14 @@ html

#tabs-wrapper(v-if="isTabActive")
#tab-resize(onmousedown="registerMouseMove()")
.tab-close(v-on:click="isTabActive=false")
.tab-close(v-on:click="isTabActive=false;")
Copy link
Member

@eugenepeh eugenepeh Mar 3, 2019

Choose a reason for hiding this comment

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

this change doesn't seems to match the purpose of this PR

@yamidark yamidark requested a review from eugenepeh March 5, 2019 14:17
v-bind:key="generateKey(tabInfo.tabAuthorship)",
v-bind:info="tabInfo.tabAuthorship")
v_authorship#tab-authorship.tab-pane(
v-if="tabType=='authorship'"
Copy link
Member

Choose a reason for hiding this comment

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

space around operator, also, why not follow existing style to use ===?

@@ -166,6 +163,10 @@ html

vuetemplate#v_authorship
#authorship
// TODO: remove in #524
.toolbar(v-if="info.totalCommits > 0")
a(v-if="activeFileCount===0", v-on:click="expandAll(true)") Expand all
Copy link
Member

Choose a reason for hiding this comment

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

space around operator ===

frontend/src/static/js/main.js Show resolved Hide resolved
@ongspxm ongspxm requested review from eugenepeh, yamidark and a team and removed request for apoorva17, eugenepeh and yamidark March 12, 2019 02:28
@ongspxm
Copy link
Contributor Author

ongspxm commented Mar 12, 2019

@yamidark Merge?

@yamidark yamidark changed the title refactoring to keep toolbar within v-authorship Refactor toolbar into v-authorship tab Mar 12, 2019
@yamidark yamidark removed the request for review from a team March 12, 2019 12:03
@yamidark
Copy link
Contributor

@ongspxm We just merged in #487, seems like there is a small conflict, can help to resolve it?

@@ -199,6 +196,10 @@ html

vuetemplate#v_authorship
#authorship
// TODO: remove in #524
.toolbar(v-if="info.totalCommits > 0")
a(v-if="activeFileCount === 0", v-on:click="expandAll(true)") Expand all
Copy link
Contributor

Choose a reason for hiding this comment

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

Untitled

Seems like this activeFileCount variable hasn't been refactored to latest master?

@ongspxm
Copy link
Contributor Author

ongspxm commented Mar 12, 2019 via email

@yamidark yamidark merged commit daaed30 into reposense:master Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants