Skip to content

Usability starting#12

Merged
BlindTerran merged 16 commits intomainfrom
Usability_starting
May 19, 2024
Merged

Usability starting#12
BlindTerran merged 16 commits intomainfrom
Usability_starting

Conversation

@BlindTerran
Copy link
Copy Markdown
Owner

No description provided.

BlindTerran and others added 16 commits May 11, 2024 15:48
User status will be changed when they are online or offline (close the browser)
socket_routes.py: a get status method for furture development to fetch and display a friend's online status, a set status statment is added to both socket connect and disconnect to change the user status
db.py: two new methods to set and get user status
models.py: a new column in user table to store user status
now user can remove friend from their friend list, also some changes made to the website style, added some css effects.
home.jinja: a new button to remove friend, and handle the firend remove event
index.jinja: now our website has a formal name WisdomExch for winsdom exchange (kinda nonsense at the current moment but it will make sense after the knowledge repository feature is developed)
base.jinja: add css bootstrap
app.py: backend handler for removing firend
db.py: database interaction to remvoe friend
migrate the chat room to the database, now the chat room is persistent and recorded. Construct infractructure for furture message history feature development. Reconstruct the database to include a Chatroom, Counter, Conversation, and UserGroup table, they will help yield the chat system data persistent layer.
models.py: new tables, making chatroom, user group, identifier counter, and message persistent, they are no longer volatile and won't be wiped off after the server shuts down.
socket_routes.py: modify the join method, now the join room method call is delegated to the database API
db.py: new methods to interact with the database tables, including get id counters, get private chat room id, create private chat room. These methods are to replace the old Counter class instance methods, the Counter class in the models.py is deprecated.
history messages are fetched and restored if user rejoins a room (by clicking chat button).
socket_routes.py: add method calls to store and fetch messages in the join method.
db.py: methods to store and fetch messages from the database.
the ui is re-designed for index, login, and sign up page. User can choose a theme colour on index page, and the theme colour will be applied to the rest of the pages. The new home page is still under work, the old home page is not removed, if you want to access the old home page, simply change the home method return value to home instead of new_home jinja. below is the file change log
app.py: the login(directs user from index page to login page), login_user(which takes user to their home page), signup(takes user from index to signup page) are changed to inlcude the theme colour fetched from the database, the theme colours will be returned to the frontend. The singup_user method has not changed (which takes newly signup users to the home page).
models.py: a new class ThemeColour that maps requested theme to corresponding primary, secondary, and font colour. the class is instantiated in the app.py to fetch corresponding theme colours.
new_home.jinja: under development...
index.jinja: reconstructed, theme colours are chosen here, if no theme colour is chosen, the defult theme colour is black.
new_singup.jinja: reconstructed, expect the java script section. Theme colour will be applied to this page.
new_login.jinja: reconstructed, almost identical to the sign up page. Theme colour will be appled to this page.
END LOG
changes made to the index page, now there are smooth transition animation on the theme buttons when mouse hovered, and the colour change will appear as a fade out effect on the logo text. Add theme colour change to the login and sign up buttons.
index.jinja: some css changes, span tag added to html, and signup login button colour change added. some js code to support animation.
this friend page scaffold is developed, backend handler is yet to be implemented. The groups section is yet to be implemented.
friends.jinja: constructed the left sidebar and the banner, which the design can be copy overed to other pages. Move some content display and js code from old home page to here.
the chat page scaffold is developed, the js code refreshfriends is newly added and tailored based on the one in old home page. the function is yet to be finished and may induce bugs if you load into this page. If code roll back is necessary to redevelop, delete the js code and the content in the left side card html element.
A reconstruction for chat feature, the user clicks an active chat to initiate a chat, join a chatroom. The chat title will be displayed, and group related information will be displayed in the right side card, and chat history will be pulled from the database. If the chat is a group chat, the right side card will display group members and people can be added to the group (underdevelopment, testing are needed).
Chat.jinja:  sets up to display active chats, messages, and group related information in the right side card.
App.py: some handler to get data from database.
db.py: database interaction codes to fetch related data
Models.py: some to_dict methods added for ease of json transformation when returning data to client side.
new_login: the text adapts to theme colour
Backend for knowledge repo has been finished, but implementation on the frontend, using `knowledge_repository.jinja` is problematic.
Basic functions including group chat, private chat, friends page are completed. This update makes the buttons on the side bar to be clickable and redirect users to other pages. Fixed bug when users signup and the theme colour is not displayed.
No time to write the file change log
[FEAT] Complete group chat and friends page
@BlindTerran BlindTerran merged commit 7104a3f into main May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants