[GSoC 2022] Finish the new web interface
#1
Hello Kodi Community,

I am Mohd Shaheer, Computer Science undergrad in freshman year. I’m interested in the project “Finish the new web interface” and have started working on it. Following is a brief about my background & progress so-far.

Brief about me:
I have sound background in Algorithms/Data-structures, Maths (qualified for ACM-ICPC regionals in high-school). I have strong fundamentals in systems topic like Computer Networks, Operating System, etc as well.
           I also have past internship experiences in web-development (both FE & BE) working across different tech-stacks. I’m also well-equipped with UI/UX design principles and have built UI/UX mock-ups using Figma for a couple of startups.

My progress so far:
  1. I have setup the elm-chorus codebase and got decent overview of the project scope (had brief overview of chorus2 repo).
  2. Got decent understanding of elm to start reading the codebase
  3. At the moment, I’m working on getting comfortable with the code flow of the source.
Next Step(s)
  • I will start working on the sort feature for the song/album/artist/movie/video, as soon as I have gained decent understanding.

Please let me know if there’s any other issue that should be prioritized over ‘sort feature’, I’d be happy to work on that instead. Any other guidance is most welcome

Thanks & Regards,
Mohd Shaheer
Reply
#2
Hey, nice to have you Smile
Reply
#3
Hi @Razze ,

Thank you for the warm welcome. I wanted to share some update & discuss a doubt regarding an ‘issue’ I’m working on.

This past week I’ve been learning more about elm and functional programming paradigm in general.
Since, it is new to me & I’m still learning, I wanted to start with a basic issue to solve. 

Therefore, I started working on issue ‘add icon change for repeat, shuffle, mute’
  • I’ve created a Pull request (Link) for the same with icon change functionality for ‘shuffle’, ‘mute’, ‘play’.
  • I couldn’t implement it for ‘repeat’ due to existing circular dependency issue with the files (details below)

Current issue I’m facing:
  • Currently the Shared.elm file defines various shared types including ‘RepeatType’. And Components.PlayerRow is imported into Shared (via Components.Frame). 
  • Now, since we need to access this ‘RepeatType’ in PlayerRow to implement repeatButton with icon change functionality, we’ll need to import Shared.elm
  • But this creates a circular dependency. 

Possible solution(?)
To break this circular dependency one possible solution could be to move the shared types in Shared.elm to another file (say SharedTypes.elm) and import it wherever required (including Shared.elm).
But I’m not sure if that’s the right way to go forward with, would be great to have your guidance on the same.

As next step, I’ll resume working on ‘sort feature for song/album/artist/movie/videos’ as planned earlier. As soon as I receive inputs on this doubt, I’ll make the necessary changes & raise a PR for ‘repeat icon change’ functionality as well.

Thanks & Regards,
Mohd Shaheer
Reply
#4
Hey, I think your approach is correct and would have been something, we would have needed to do in the long run anyway.
Reply
#5
Thank you for your inputs and comments on PR, I have made the necessary changes to it. 
I will go ahead and refactor the code, and then implement the "repeat icon" functionality.
Reply
#6
Hi @Razze
I had created a PR yesterday regarding refactoring code to break circular dependency and implement repeat icon functionality. 

While trying to refactor other shared types/aliases into SharedTypes.elm I figured that some of them are generated by elm-spa by default in Shared.elm, and it doesn’t seem a good idea to try to refactor due to existing convention around it. So, I thought it’s fine to only keep custom shared types in SharedTypes.elm
       Just wanted to gather your inputs on it, if it seems fine or not. If not, would be great if you could share your thoughts on what should I do differently and thought process behind it.
I’ll resume working on sort playlist issue, and try to raise a PR asap.

Thanks & Regards,
Mohd Shaheer
Reply
#7
Merged Smile
Reply
#8
Hi @Razze ,
Thank you for reviewing  Blush I have created a PR for sorting functionality based on different sorting criterias like artist, label, etc. It seems there’s no front-end code for the sort filter yet (different criterias) so I couldn’t link them to the front-end. I’m implementing the UI and will push it in subsequent commits. 
         I wanted to check with you if there’s any task you’d recommend to take up next? (any high priority, relevance, etc). 

Also, what would be the good time to start working on the proposal?

Thanks & Regards,
Mohd Shaheer
Reply
#9
Hi @Razze , 
I was working on the sort filter frontend and while working on it, I ran into an issue.

Following is what I tried to implement:
  • I wanted to add a button under sort section on Vertical Navbar which will be clicked by the user if it wants to see the elements in sorted order. 
  • The button will send a Msg (‘SortMsg’ which i added in SharedType.elm ) when clicked (via OnPress event) and upon receiving the message in Shared.elm, it will call the sort methods from SharedUtil.elm and update the model list for that object.
  • Now the model list will be updated so that the sorted list will be rendered on the page through the view functions.


Following is the issue I’m facing - 
  • I created an Input.Button element in VerticalNav.elm in the view function and it’s onPress event required a "msg", i wanted to pass SortMsg ("Type Msg") which i declared in SharedType.elm and when i did that it gave me the following error ->
  • Image
  • OnPress required `Just msg` while i am passing `Just Msg` and i am unable to figure out how should i implement it in such a way that i can pass Msg to OnPress.
  • I tried typecasting Msg->msg but still wasn’t able to make this workaround work.

It would be great if you could guide me on the right track.

Thanks & Regards,
Mohd Shaheer
 
Reply
#10
I would recommend you to join the elm slack, that should be the easiest way to figure out such stuff
Reply
#11
Hi @Razze , 
Thank you for the suggestion. Apologies for the delay in response, this past week I was attending back-to-back university exams and traveling immediately after, so I couldn't spend much time on it. I’ll resume working actively on this as well as a draft proposal, and will get back with it asap.

Thanks & Regards,
Mohd Shaheer
Reply
#12
Hi @Razze  and the Kodi community,
         I have been working on my draft proposal for GSoC lately. The proposal can be found here: GSoC Proposal. It would be great if you could share your valuable feedback and suggestions.
It has been a great learning experience so far and I look forward towards collaborating during the summer.

Thanks & Regards,
Mohd. Shaheer
Reply
#13
Hi @Razze ,
Thank you for considering me for the opportunity to collaborate with the Kodi organization as a GSoC contributor. I will try do my absolute best and work with utmost sincerity.
I look forward to all the learnings that lies ahead.
Reply
#14
Hi @Razze ,
The following is my weekly report. For most of the last week, I was preoccupied with my college tests.

So after the tests ended I had begun to brush up on my elm skills in order to become more familiar with the workings of the Elm language and to explore parts of the codebase that I haven't touched yet, such as the workings of WSDecoder.elm, which uses the Json.decode module to decode json values into elm values, etc.

Thanks & Regards
Mohd. Shaheer
Reply
#15
Hi @Razze ,

Following is my weekly report: I've been reading about how json works in Elm for the past few days, and I had started thinking about possible solutions for implementing proposed ideas, such as how to implement specific functionality, what should be the best way to implement it, how to keep the code short and simple, and so on. The coding phase will begin next week, and I'll step it up a notch in my weekly reports.

Thanks & Regards
Mohd. Shaheer
Reply

Logout Mark Read Team Forum Stats Members Help
[GSoC 2022] Finish the new web interface0
This forum uses Lukasz Tkacz MyBB addons.