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 Subway #292

Closed
10 of 11 tasks
thedjpetersen opened this issue Feb 14, 2014 · 22 comments
Closed
10 of 11 tasks

Refactor Subway #292

thedjpetersen opened this issue Feb 14, 2014 · 22 comments
Labels

Comments

@thedjpetersen
Copy link
Owner

So I have begin work in completely refactoring subway. Here is a bit of the roadmap(checked boxes are completed tasks:

  • Rewrite the frontend so the views use the Facebook React library - this makes the frontend code cleaner(including the event handling system)
  • Handle raw commands on the frontend - this lowers the chances of missing IRC commands on the frontend, I want to switch just on raw commands and numeric codes
  • Handle user commands
  • Handle commands on the backend
  • Using Open Sans as the default font
  • All clientside dependencies are managed with Bower
  • Implemented a Grunt build system to handle script compilation
  • Layout is all flexbox
  • Rewrite the backend with a focus on simplicity(this is a bit of a wash how well this has been accomplished)
  • Write a plugin handling system to handle messages on the client - this would make it easy for others to write plugins and then just specify them. Instead of creating issues here.
  • Solid mobile support

I would love to hear ideas about the architecture or how this transition should happen. At the moment I believe creating a separate branch and working off of it.

@BYK
Copy link
Contributor

BYK commented Feb 14, 2014

I kind of think React's way of mixing JS and HTML is not really good. Otherwise all looks great and I'd like to give this a hand if possible.

I've actually ported the IRC handling library on the backend to front-end, if you think that would be useful. I'm willing to help with any other tasks too.

@tlaundal
Copy link
Contributor

This sounds good. It's nice to see some activity on the project.

@thedjpetersen
Copy link
Owner Author

@BYK is your only issue with react a stylistic thing?

@thedjpetersen
Copy link
Owner Author

Ok I have put the work on the refactor branch - very little works, just a heads up

@BYK
Copy link
Contributor

BYK commented Feb 14, 2014

@thedjpetersen, it is more of a philosophical thing. I believe in separation of concerns but I'm also open to new ideas. Since you've already done the hard work, I say why not? :)

@46bit
Copy link

46bit commented Feb 15, 2014

This sounds great. I've been working on a refactor to enable multiple IRC networks etc (https://github.com/46bit/subway) but trying to keep it working the same.

@thedjpetersen
Copy link
Owner Author

@46bit I am taking that approach from the beginning with the rewrite

@hermansc
Copy link
Contributor

How will this affect future commits and pull-requests to the master branch?

@thedjpetersen
Copy link
Owner Author

@hermansc as soon as the newer version reaches feature parity - I would like it to replace the master branch. If the refactor stagnates - nothing will change.

@46bit
Copy link

46bit commented Feb 16, 2014

@thedjpetersen: It would be great if you could hang out in #subway on Freenode?

@thedjpetersen
Copy link
Owner Author

@46bit sure I'll hop on for a bit

@thedjpetersen
Copy link
Owner Author

Quick update:

The rewrite is coming swimmingly so far. Handling and emitting raw IRC commands has been much easier than working with the node-irc wrapper commands. As you can see from the checkbox list above I am working slowly trying to get parity with weechat commands. I need to ensure that I am handling every received event on the frontend as well. If anyone wants to help with this be sure to ping me and I would love to give more info on this. After the client can is fully functional, I'll work on adding persistence and then polishing up the UI.

@thedjpetersen
Copy link
Owner Author

Took some time off of writing support of commands to polish up the settings. Next up is porting the legacy persistence/auth setup. I would love to hear feedback about the settings work I did as well.

@tlaundal
Copy link
Contributor

tlaundal commented Mar 7, 2014

I would like to thank you for doing this rewrite, @thedjpetersen. I really appreciate it.

I will look into doing some of the commands later this weekend.

@thedjpetersen
Copy link
Owner Author

So the work for backend persistence is well underway. I have sketched out something basic right now and committed it. I will have to revisit it. At the moment everytime there is a state change in the client I am just persisting it with a sync call on the client. I will need to implement something that keeps track of a logged in client through a server method.

@thedjpetersen
Copy link
Owner Author

After discussing with @hermansc in the IRC channel - its clear the most optimal way to keep track of the state of client on the server is to modify the client code so it can be used by the server. This includes the backbone models and the irc handling code.

@thedjpetersen
Copy link
Owner Author

Fixed some minor bugs with the persistence going to add logging of messages next - also need to move that massive checklist of commands above somewhere else

@thedjpetersen
Copy link
Owner Author

Basic logging implemented - need to make it so when history is loaded it doesn't greedily continue to load history. This should be accomplished by maintaining the scrollbar position.

If I could get some feedback on this work from anyone I would really appreciate it as well.

@thedjpetersen
Copy link
Owner Author

Getting really close to a RC - could really use some people to help me test the client out and identify bugs.

@chiguireitor
Copy link

Going to download it right now, i'm using this as the support channel for my business :)

@badosu
Copy link
Contributor

badosu commented May 12, 2014

Really really good job @thedjpetersen!

Know if the plugin api is already defined? Would care to explain how it works, if so?

I am thinking in cleaning: https://github.com/badosu/subway/blob/master/assets/js/views/message.js#L30-32

@thedjpetersen
Copy link
Owner Author

Badosu - I haven't documented it yet but it works more or less like this:

Info about creating a plugin:


Plugin syntax

  • Plugins are defined to the app.plugins namespace
  • The plugin method accepts the message - and returns the parsed message(as an html object) and a listener(which can be attached to the element)

thedjpetersen added a commit that referenced this issue May 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants