Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Implement the "cd" service #57

Closed
petrspelos opened this issue Feb 17, 2019 · 2 comments
Closed

Implement the "cd" service #57

petrspelos opened this issue Feb 17, 2019 · 2 comments

Comments

@petrspelos
Copy link
Member

This service should handle all the logic for the cd command. cd stands for Change Directory.
Miunie represents the server space as a tree similar to your operating system.
Here is the structure we decided to use:

πŸ“ ROOT
    β”œ πŸ“ Data
    β”‚   β”” πŸ“ UserAccounts
    β”‚       β”” πŸ“„ u123456789.json
    β”” πŸ“ SomeServer
          β”œ πŸ“ Channels
          β”‚   β”œ 🏠 general
          β”‚   β”” 🏠 off-topic
          β”” πŸ“ Users
                 β”” πŸ‘€ 123456789

ℹ️ This structure will be extended based on implementation details and/or new features.

The cd service should only allow a user to navigate into directories (shown as πŸ“ ).

ℹ️ Implementing this service will create a need for the ListDirectoryService to be reworked in order to display other directory contents.

(This doesn't have to be done by the implementer of the cd service, just please create an issue for it)

The cd service manipulates the MiunieUser's cursor.

This cursor is a List of ulongs representing the current position in our tree structure.

The ROOT's ID should be 0.
The Data's ID should be 1.
etc.

These IDs should be constant and should never change.
You are free to pick different constants based on the implementation.
When referencing Channels, Users, or Servers, the ID should be the Discord ID.

ℹ️ If the user seems to be in an invalid position, they should be redirected back to root (by emptying the NavCursor list).


Ideally, this service would have Unit tests, if you are able to implement this feature, but can't for some reason add unit tests, feel free to PR your changes. Others will help you with the unit tests, especially if this is your first time contributing. πŸ™‚ πŸ‘

@ael-mas
Copy link

ael-mas commented Mar 21, 2019

Hey, I'd like to work on this issue if it's still up for grabs

@petrspelos
Copy link
Member Author

@ael-mas sure thing! Looking forward to it. πŸ™‚ πŸŽ‰

@petrspelos petrspelos added the up-for-grabs Issue open for taking label Mar 22, 2019
@petrspelos petrspelos added LiveShare and removed up-for-grabs Issue open for taking labels Apr 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants