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

started working on porting new Activity view to Android #183

Merged
merged 6 commits into from Apr 28, 2020

Conversation

ErikBjare
Copy link
Member

No description provided.

@ErikBjare
Copy link
Member Author

@johan-bjareholt There's still some work left to do, but first I'd like to discuss my approach to dealing with the overlap between Android and desktop stuff. It isn't perfect, but it works and I'm not sure what would be the best way to do it.

@@ -256,11 +290,13 @@ const actions = {
state.buckets.browser_buckets.length > 0;
const active_available = state.buckets.afk_buckets.length > 0;
const editor_available = state.buckets.editor_buckets.length > 0;
const android_available = state.buckets.window_buckets[0].includes('android');
Copy link
Member

Choose a reason for hiding this comment

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

Oh, the android bucket just have a normal bucket type?
That certainly makes things confusing.
Let's just hope that no one has 'android' in their hostname lol.
Can't you have something like ".startsWith('aw-watcher-android')" or something instead?

Copy link
Member

Choose a reason for hiding this comment

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

Also, I think you need to check that "window_buckets" has a length of 1 or more before doing that check to avoid errors on desktop.

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be easier if you in the "buckets" vuex instead had a "state.buckets.android_buckets" instead of here?
You could then also exclude the android buckets from the usual window buckets.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, the android bucket just have a normal bucket type?

Yeah, bad initial choice on my part. I expect us to change this eventually in some Great Migration (as with currentwindow, afkstatus).

Let's just hope that no one has 'android' in their hostname lol.
Can't you have something like ".startsWith('aw-watcher-android')" or something instead?

Fixed.

Also, I think you need to check that "window_buckets" has a length of 1 or more before doing that check to avoid errors on desktop.

Fixed.

Wouldn't it be easier if you in the "buckets" vuex instead had a "state.buckets.android_buckets" instead of here?
You could then also exclude the android buckets from the usual window buckets.

Fixed.

src/queries.ts Show resolved Hide resolved
@ErikBjare
Copy link
Member Author

ErikBjare commented Apr 28, 2020

@johan-bjareholt Also note the fix in 035d4cc, looks like you broke it before.

@ErikBjare
Copy link
Member Author

@johan-bjareholt I think this should be merged now. There's still stuff that could be nicer but it works and I won't have more time to work on this anytime soon.

@ErikBjare ErikBjare merged commit c535835 into master Apr 28, 2020
Road to 1.0 automation moved this from In progress to Done Apr 28, 2020
@ErikBjare ErikBjare deleted the dev/android-update branch April 28, 2020 15:11
Copy link
Member

@johan-bjareholt johan-bjareholt left a comment

Choose a reason for hiding this comment

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

Looks good to me, the rough stuff since last time has been fixed so I think it's fine!

},
top_categories: function() {
return this.$store.state.activity.category.top;
visualizations: function() {
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

src/components/SelectableVisualization.vue Show resolved Hide resolved
src/queries.ts Show resolved Hide resolved
window_buckets: [],
editor_buckets: [],
browser_buckets: [],
afk: [],
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

src/main.js Show resolved Hide resolved
src/store/modules/activity.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Road to 1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants