Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* key fields * fix field naming * frontend tweak * testing and tweaks * optimisations * tiny optimisations * tweak form * Add a Jenkinsfile for testing purposes Jenkinsfile is being added to the up most directory to start the process of continuous integration and automation of tests. * Add Dockerfile and .dockerignore Dockerfiles and .dockerignore were introduced to containerise deployments which had not previously been done. This commit now creates a standardised environment for all machines to run deployment code. * Update docker-compose.yml file This is necessary to reflect the additions of the Dockerfile and create containers for the API and the database. * Update client options Client options previously was addressed to localhost:27017. With the introduction of Dockerfiles it was necessary to change this to the container ID so that the containers to communicate with each other. * Update README.md to outline steps for deployment Readme file was updated to refelct changes to deployment and give current and future teams a guideline of where to start with coding and deployment. System Architecture and Testing information will be added later on as that information becomes available. Deployment steps may change as we progress to live deployment. * Remove page divider for README file * Update README Removed Maven dependency line. * Remove services directory and contents Due to the successful implementation of a Dockerfile and edits to docker-compose, there is not functionality that these files bring as they were already empty. * Update README.md to give credit for template * CW-42 Delete previous error handling. Error handling of database previously would kill the application, shutting down the server and stop serving the frontend. If this was continued into deployment, then this would be a major problem with a minor fix that might not be found. This was found when testing the database queries as there was no way to retrieve errors without propogating up. Errors will be handled in a fix to the APIs later down the line. * CW-42 Update NewSponsor to return values. To be able to access the database for sponsors, an ID needed to be given. However the NewSponsor function never returned this information and so there was no way to access GetSponsor. Found this through testing and changed accordingly. * Update comments and remove unused code. * Update functions to reflect new return values. Due to the fact that sponsors.go return values were added, sponsor APIs had to be changed accordingly. The next step is looking at input and parsing input to be able to pass the correct information to the functions in sponsor.go. * Remove err ahndling from time.Parse. This will always give an error, even if successful. Best to parse inputs before it gets to this point. * Refactor new and delete functions. Refactored to reflect te database should be interacted with. Removing sponsorid means one less field to keep track of. * Add database queries to retrieve sponsor/s * Refactor handlers into sponsor file. As per suggestion of Sergio, I have refactored the handlers into the sponsor file so everything is in one place that relates to sponsor. This means it is easier to test and find files that relate. * Refactor setup of database. Database should be abstracted and makes it easier to handle if its all in one place. * Add Get Sponsor API handles. * Refactor database queries and add validation. Due to the fact that the database queries were becoming one line code as I refactored, the decision was made to absorb that code into the API handles. This may be changed back due to abstraction and security but as of now it is cleaner code. A validation pacakage was also introduced to reduce the number of lines used for validating. * Validate handler inputs, populate db on startup * Fix tier validator * Fix non-deletion bug. * Fixed 'no such sponsor' bug. * Fix same issue as prev commit. * Remove index collation. * Update footer to get sponsors from API. * Change frontend fetch for sponsors. * Filter sponsors based on tier. * Update codeowners * Fix JenkinsFile syntax. * Add code to test Jenkinsfile. * Fix test agent * Fixe sh command for running newman. * Update to reflect changes in testing (Postman) * Add testing functionality to Sponsor API. * Transfer testing capabilities to Github Actions. * Try to fix docker-compose workflow error. * Fix indentation for ci.yml. * Check workflow for the docker-compose file. * Update ci.yml * Rename job. * Add a newman action for postman testing. * Remove newman action. * Remove -g flag. * Revert back ro newman action. * Remove test sh line, * Update ci.yml * Split steps * Remove newman. Will figure out how to integrate newman and postman api testing at a later date. * Provide comments for unclear sections. * Fix CI steps. * Update readers on how input validation occurs. * CW-34 Handle POST request for enquiries (#32) * Created a handle to deal with enquiries 'Contact Us' and 'Sponsorship Request' forms have the same fields (name, email, message). They will use the same handler but different endpoints to distinguish the emails that these enquiries must be forwarded to. * Refactor handleEnquiry into mailing.go Refactored to encapsulate all mail related functions together in a separate file. * Use structs for validation The purpose of validating thorugh structs is to simplify and unify the verification process. * Include Enquiry tests to the Postman collection Replaced the sponsors collection with a 'CSESoc Collection' containing both sponsors and enquiry related API end-2-end tests. Co-authored-by: Sergio Mercado Ruiz <[email protected]> * CW-40 Feat/faq (#34) * Created a handle to deal with enquiries 'Contact Us' and 'Sponsorship Request' forms have the same fields (name, email, message). They will use the same handler but different endpoints to distinguish the emails that these enquiries must be forwarded to. * added and completed faq.go * removed faq collection from server.go * added static folder with faq.json * removed print statements * fixed small error in server.go * replaced function names retrivefaqJSON to be more descriptive * handle errors in faq.go through returning instead of calling log.fatal * updated faq struct to include lowercase for consistency * updated faq.json to use lowercase * Remove regex pacakge Was not being used. Co-authored-by: Sergio Mercado Ruiz <[email protected]> Co-authored-by: Tommy Truong <[email protected]> * Update CODEOWNERS (#35) * Revert "CW-40 Feat/faq (#34)" (#36) This reverts commit 6c2253cd2a90ae34824af197db636e806308a68e. * CW-40 Create GET response that serves question-answer pairs (#37) * Created a handle to deal with enquiries 'Contact Us' and 'Sponsorship Request' forms have the same fields (name, email, message). They will use the same handler but different endpoints to distinguish the emails that these enquiries must be forwarded to. * added and completed faq.go * removed faq collection from server.go * added static folder with faq.json * removed print statements * fixed small error in server.go * replaced function names retrivefaqJSON to be more descriptive * handle errors in faq.go through returning instead of calling log.fatal * updated faq struct to include lowercase for consistency * updated faq.json to use lowercase * Remove regex pacakge Was not being used. * Added postman tests for faq Co-authored-by: Sergio Mercado Ruiz <[email protected]> Co-authored-by: Paula Tennent <[email protected]> Co-authored-by: paulatennent <[email protected]> * Update contribution with Jira integration. * [CW66] Feat/api refactor (#38) * Update endpoints in server.go to be prefixed with /api/ * Update footer to fetch sponsors from new endpoint. * Update Postman tests to use new endpoints. * Restructured Code Repo to frontend/backend * Change docker target for CWD. * Revert "[CW66] Feat/api refactor (#38)" This reverts commit 1014e483be6cad5285260d9d4aaf9baea04bb985. Accidental merge to dev instead of PR. * Fix the merged/revert branch * Add remaining of fixes * created faq_test.go to test faq.go through the testing package * reverted previous commit * create faq_test.go to test faq.go via testing package * deleted faq.go, moved to different branch * Fix/testing (#40) * Draft testing files. Testing the pros and cons of testing using Golang and of postman. * Add Go Tests to CI * Add testing for enquiry handling Created a mailing_test.go file to replace Postman tests and conduct tests related to mailing.go functions * Test mailing.go * Remove one of line testing. * Update testing and methods used by test. A change was needed to use the testing framework more rigoursly and check actual response bodies. This meant that changes occured to the http responses to be able to access easily the content needed. * Add check for sponsor errors. * Remove unused Go dependencies. * Draft testing files. Testing the pros and cons of testing using Golang and of postman. * Add Go Tests to CI * Add testing for enquiry handling Created a mailing_test.go file to replace Postman tests and conduct tests related to mailing.go functions * Test mailing.go * Remove one of line testing. * Update testing and methods used by test. A change was needed to use the testing framework more rigoursly and check actual response bodies. This meant that changes occured to the http responses to be able to access easily the content needed. * Add check for sponsor errors. * Remove unused Go dependencies. Co-authored-by: Sergio Mercado Ruiz <[email protected]> * Remove boboeee as codeowner. To streamline PR reviews so that only concerned parties need to give the review. Members will still be informed of a PR through the slack integration. * CW-40 Added faq_test.go (#41) * added faq_test.go to test faq.go via testing package * Remove boboeee as codeowner. To streamline PR reviews so that only concerned parties need to give the review. Members will still be informed of a PR through the slack integration. * added faq_test.go to test faq.go via testing package * CW-40 Remove assertStatus function Due to the fact that all test are in the same package the function was causing the compiler to throw a redeclaration error. This needs to be addressed with a general refactoring of backend code. Co-authored-by: Paula Tennent <[email protected]> * Feat/feedback form (#42) * created a way to handle feedback form enquiries * added api path for feedbackEnquiry * postman tests for feedback * added feedback_test.go to test FeedbackEnquiry in mailing.go * added api prefix for feedback * fixed inputting no email to being valid in mailing.go * removed postman testing * removed duplicate assert function * corrected the path in feedback tests (#43) * Insert new dependencies. * Move deployment dockerfiles. This is in preparation for a merge with the fix/Dockerfiles branch that contains new dockerfiles relating to streamlining development. * CW-71 Move deployment dockerfiles. This is in preparation for a merge with the fix/Dockerfiles branch that contains new dockerfiles relating to streamlining development. * Revert "CW-71 Move deployment dockerfiles." This reverts commit b6a8c68899314592e04bfaa52a9e32d4c67655bb. * CW-81 Restructure Frontend and Backend to be more distinct (#39) * Restructured Code Repo to frontend/backend * Made docker work on new folder structures * Fixed frontend server pages Co-authored-by: Tommy Truong <[email protected]> * CW-44 Compose emails and send them using Mailjet (#47) * Created a handle to deal with enquiries 'Contact Us' and 'Sponsorship Request' forms have the same fields (name, email, message). They will use the same handler but different endpoints to distinguish the emails that these enquiries must be forwarded to. * Added starting code from Gmail API documentation The Gmail API documentation found at https://developers.google.com/gmail/api/quickstart/go * Created an init function to connect with the Gmail API InitMailingClient() creates a client instance to the Gmail API and keeps it private to the rest of the server. The server can only interact with it by calling another function to send emails. * Developed a function to send emails from a pre-authorised account SendEmail() takes in the fields from the enquiry form; it then composes and sends an email to a target address. * Updated module files to include new dependencies * Mailing init function exits with a fatal error if it fails * Refactor handleEnquiry into mailing.go Refactored to encapsulate all mail related functions together in a separate file. * Use structs for validation The purpose of validating thorugh structs is to simplify and unify the verification process. * Implement the Message struct developed in CW-34 mailing.go is only interfaced with using InitMailingClient() and HandleEnquiry() * Establish simple SMTP connection to Gmail to send emails Commented out previous Gmail API approach and modified functions to establish a SMTP connection to Gmail enabling only the sending of emails from an authenticated account ([email protected]) * Extract message formatting to a helper function composeEmail formats the Message struct and a target email to be of RFC 822-style ready to be sent through SMTP * Use a library to obtain the password for the SMTP authentication The password is obtained from stdin (with echo off) upon server initialisation * Fix error checking in getPassword() * CW-62 Unit testing for composeEmail() Wrote a function to verify the construction of email messages in Go * CW-44 Remove GmailAPI-related code Removed commented out code since we are using the SMTP approach to send emails rather than using the full-fledged Gmail API * Add a token to manipulate GitHub Secrets * Revert "Add a token to manipulate GitHub Secrets" This reverts commit 8c28fe69b88deaa2b74a0ed03ca8eaab84f5e9fc. * Change Gmail API to MailJet API We are using a third party mail provider to avoid having to store the attached email password in plaintext. * Add Mailjet keys These keys are attached to [email protected] * Create global variables related to message bundles Introduced the concept of bundling multiple enquiries into a single email to remain under MailJet's free tier limit of 200 emails/day. * Create function that joins messages joinMessages() returns a HTML string with all the messages concatenated * Update mailing tests to match the new MailJet framework Changed the tests to the new concatenated email body format. * CW-58 Employ goroutines to run the timer concurrently Goroutine is started on init and ticks every 15 minutes to send enquiry bundles * CW-44 Fix bug to avoid sending empty bundles * CW-44 Handle case where the Mailjet API can't be reached If the API can't be reached rollover the pending enquiries to the next 15 minute cycle. * CW-44 Fix reference error * CW-44 Include safe stopping functionality to the echo server The ability to stop gracefully lets us dispatch all pending enquiries before exiting the program. * CW-44 Prepare branch to merge with dev * CW-44 Merge feedback_test.go into mailing_test.go * CW-44 Handle an echo server crash By defering the dispatching of bundles I'm ensuring that they will always execute after main(), even if the echo server crashes. * CW-44 Refactor shutdown procedure Implemented a graceful shutdown as per Echo's documentation. Standardised the shutdown procedure to fuction with server errors and with the case of someone CTRL+C'ing the program (sending an interrupt signal), this new implementation works with both. Used channels (https://gobyexample.com/channels) to communicate across goroutines. * CW-44 Remove unnecessary goroutine creation sendEnquiryBundle and sendFeedbackBundle can just run normally. * CW-44 Change location of bundle size check This was done to simplify the execution order by preventing the entering of send* functions if their corresponding bundles are empty. * CW-44 Combine mailing timers into one goroutine with different intervals This was done to simplify the program and reduce the number of concurrent goroutines. * CW-44 Refactor mailing.go by merging two separate workflows Created enums to define the 3 types of messages (info, sponsorship and feedback) and unify the way the server interfaces with mailing.go. Merged the Handle* functions to take in both enquiries and feedbacks. Refactored the send* functions into a single, reusable sendBundle() function. * CW-61 Feat/scrape sponsors (#48) * CW-61 Update the source of sponsors info this is changes is necessary to update sponsors and have all the sponsors instead of a subset * CW-61 Change the test file to fit the new struct * CW-61 Fix validation bug * CW-61 Delete unused code * CW-61 Recover deleted description * Update the tier value in sponsor.json * Update the vue file regarding new tier index * Update the testing file for the new tier value * CW-71 Dockerfiles * CW-68 Feat/create api framework frontend (#46) * Create inital API framework * removed empty line * Refactored to sponsors * restructured to APIClient and tested * CW-122 Fix target emails for development (#51) Change the target emails for the development phase. Used https://www.eringibson.co/blog/how-to-create-unlimited-testing-accounts-with-the-gmail-hack * CW-67 Feat/auth tokens (#52) * Prevent vscode configuration files from being tracked. * Implement token generation * Attempt to use cookies to store JWTs * Prevent vscode configuration files from being tracked. * Implement token generation * Attempt to use cookies to store JWTs * Update appropriate endpoints to require authentication * Update tests to use authentication * Update tokens for testing to expire in 4 weeks * Update url.Values to be mapped to be initialised on creation. * Fix routing constants. (#54) * Update README.md (#50) * Update README.md This is to update the readme on the current state of testing and what it involves. * Update installation section. * Clarify deployment and testing instructions. * Fix spelling mistakes and tenses. * CW-70 Update API documentation (#53) * Create initial API framework * CW-118 Refactored sponsors * CW-118 Fix naming convention of API endpoints - Added the API version to the endpoint prefix => /api/v1. - Cleaned up server.go and fixed up comments - Print progress of server startup * CW-70 Add Swaggo modules and SwaggerUI endpoint * CW-118 Fix trailing slash issue on URIs The trailing slash on URIs was causing the tests to fail, as they were inconsistent throughout the backend server files. e.g. /api/v1/faq != /api/v1/faq/ * CW-118 Break down API structure into groups * restructured to APIClient and tested * CW-70 Fix typo, missing slash * CW-118 Unify sponsor endpoints This new arrangement makes it intuitive to find things. * CW-118 Remove 'middleware' function Removed because it's not being used and it was implemented wrongly. * CW-118 Fix naming inconsistencies * CW-118 Fix URI path * CW-118 Fix another typo * Reverted local api url * Fix Docker issue where the backend CompileDaemon fails * CW-119 Add godoc for GetSponsor Testing the doc generation for a single endpoint first. * Remove Docker volumes from the backend The server app was stored in a folder named '~' in the docker container. This change allows it to now be in the root directory. * CW-125 Generate Swagger doc files dynamically in docker * CW-125 Add doc files to the repo so CI works The Dockerfile now removes the current docs directory and recreates when executed. * CW-119 Add docstrings to Sponsor related API endpoints * CW-119 Fix wrong failure message in documentation * CW-119 Add docstrings to Mailing related API endpoints To do this I had to split the HandleMessage() function into 3 separate handlers => one for each API endpoint. * CW-70 Ensure every endpoint has intuitive error responses Returning the error returned by the function that triggered the error isn't always useful. In this commit I wrote descriptive error messages for all API endpoints. * CW-119 Include responses and errors in documentation Extended the Swagger documentation to include descriptive response and error messages. * CW-119 Add docstrings to the FAQ API endpoint * Prevent bundles from being dispatched while in development * CW-119 Add Swagger integration for bearer tokens Bearer tokens are now included in the header of certain sensitive API endpoints. * CW-70 Add a comment on how to access SwaggerUI * Fix Docker files to work with volumes * CW-70 Refactor the handlers Reverted back to the previous handling in one function while keeping separate API endpoints. Co-authored-by: boboeee <[email protected]> * Fix fetch constants * Add live reload for Vue. (#56) * Add .vs to gitignore * Fix README to reflect changes on how the API is documented (#58) * Fix README to reflect changes of how the API is documented * Update stack information regarding the API documentation * Update CONTRIBUTING.MD (#57) * Update pull_request_template.md * Update pull_request_template.md * Update CONTRIBUTING.md Co-authored-by: Gordon Zhong <[email protected]> * Fix spelling mistake. * CW-105 Clean up Backend repository (#59) * Finished clean backend repo * changed to localhost * Configured go test to run all tests * Feat/joining page (#60) * add plain joining Page * add some static facebook events cards * CW-80 Engage page (#61) * CW-80 Created Enquiry and Feedback forms The Enquiry and Feedback forms are in a separate tabs and have their respective verification. * CW-132 Display FAQs on the Engage page Fixed the wording in the FAQs from the Joining page and moved it to the Engage page * CW-135 Add a placeholder/title for the social links Inserted a title to the social links and rearranged the page to show the envisioned layout. * CW-134 Connect forms to their API endpoints Coded a send() function to send the messages from both forms. * CW-134 Extract the fetching to the APIs to the APIClient file * CW-134 Fix passing of prop into EnquiryForm * CW-135 Display social media links on the Engage page Added tiles for all the media links on the page. * Fix checksum mismatch error * CW-136 Add backend framework for social link fetching * CW-136 Updated Swaggo documentation to include social links * CW-137 Connect the FAQs to be fetched from the backend * CW-132 Fix the rendering of FAQs * CW-115 Update site components for social media (#62) * Finished fixing footer component * Fixed test bug * added bck one line * Feat/about page (#63) * CW-111 Add FAQs related to getting involved in subcommittees I had to find a place to put information from the old CSESoc website related to subcommittees. * CW-111 Add heading about Subcommittees The Subcommittees heading includes a short paragraph on the role of subcommittees on the society and the short description of each society in the form of expansion panels. * CW-111 Add Executive & Directors heading The Executive & Directors are named in a table, structured similarly to the old website. This will change based on the wireframe for this page. * CW-111 Remove unused data fields * Remove trailing lines * CW-111 Update information about the subcommittees Using the Subcommittee Application Guide I added more information to the description of each subcommittee. * CW-111 Add History heading Used the content from the old website. * CW-111 Add Workshop subcommittee to the list * CW-111 Render Executives & Directors table dynamically from a JSON This was done to reduce the number of lines of code and reduce the amount of 'dumb' HTML. * CW-111 Simplify the rendering of the Executives & Directors table even more * CW-111 Transcribbed all previous execs and directors in a JSON format * CW-111 Display previous teams I had to restructure the JSON to keep the order by using arrays instead of objects. * CW-111 Update JWT's expiry time JWTs expired yesterday. I added an extra 2 months to their expiry time. * CW-108 Store sponsor logos in the backend (#64) * CW-108 Update Swagger documentation to show that logos are fetched from the backend The logo field in the Sponsor struct now contains a base64 string rather than a URL. * CW-108 Convert logos in the sponsors static file to base64 strings * CW-108 Render base64 sponsor logos on the Vue Footer The base64 sponsor logos are essentially 'casted' to a png image and rendered in a src tag. * CW-150 Safe token storage (#65) * CW-150 Update gitignore to include the tokens directory containing the secrets This is to prevent secrets from being tracked by git. * CW-150 Add secrets' locations to the docker-compose file * CW-150 Read secret and use it to authenticate Mailjet Wrote a function in utils.go to make the process of retrieving secrets easier. * CW-150 Update GitHub Actions CI The plan is to dump GitHub Secrets into txt files, which is what Docker (docker-compose) expects. * CW-150 Use env variables instead of Docker secrets Shoutout to Gordon's comprehensive explanation :) * CW-150 Update GitHub Actions workflow This new implementation dumps the GitHub Secrets on the .env file. * CW-150 Remove debugging message * CW-150 Revert back to former Docker version * CW-150 Simplify CI file to pass in the env variables directly * CW-83 Display current and future facebook events (#66) * Unmarshal json file * Successfully pull all needed event information into the backend * Handle recurring events and ensure events are sorted * Rename a function * Add comments for clarity * Create function to serve static events file * add goroutine * CW-83 Move events into a separate package * CW-83 Fix typo in the EVENTS_URL constant * Fix variable declaration * Include event location in output JSON * Add components for events * Access events API from frontend * Patch backend to prepare to use csesoc page * Resolve frontend issues * Resolve backend issues Co-authored-by: Sergio Mercado Ruiz <[email protected]> * Update .env file documentation (#68) * Update README file with instructions on how to setup env variables Environment variables are used to inject sensitive information (e.g. tokens, secrets) into a Docker container during build. * Add a Security section to the README further explaining the use of env variables * Fix cohesiveness issues in APIClient (#71) * Update validation of Sponsor struct Removed URL validation from the `Logo` field in the Sponsor struct * Use getClient() to construct the options of socials and faqs API requests * Update socials and faqs APIClient references to match naming convention * CW-154 Menu component (#69) * CW-154 Add semitransparent overlay when clicking the menu toggle button * CW-154 Embed overlay on the whole App This makes the menu accessible from any page in the website. * CW-154 Add links on the overlay * CW-154 Connect links to existing pages * CW-154 Auto-hide menu when a link is clicked The status of the menu (shown or not) is controlled by the parent component (App.vue). So when a button is clicked we must $emit a signal to the parent to update the status of the menu to hidden. * CW-154 Apply design elements relating to hovering on links The menu links scale up x2 and become *bold* when hovered on, in their spots without interfering with other links. * CW-154 Make menu elements reactive to the size change of other elements * CW-154 Add automatic resizing based on window height Menu links will resize automatically to ensure compatibility with any screen size. * CW-154 Enable exiting the menu by clicking the background * CW-154 Narrow the clicking area for the links * CW-154 Make Menu component background fully black * CW-154 Vanish Menu component when the CSESoc_logo is clicked * CW-154 Convert `a` tags to `label` tags around `RouterLink` tags To adhere to vue-router standards. * CW-154 Disable scrolling when the Menu component is open * CW-154 Change the order of the links The new order is: About, Events, CSE Resources, Sponsors, Shop, Engage * CW-154 Add link to Sponsors page * CW-154 Fix bug that automatically scrolls to the top This bug was introduced by disabling scrolling. It consisted of the page automatically resetting to the top when the scrolling was disabled/enabled. Normally this would be worked around using JS and the window.scrollTo() but in Vue `window` is not in scope (outside mount and unmount). * CW-154 Scroll to top for all route navigations Otherwise the scroll position is saved across routes. * CW-43 Displaying Sponsors (#67) * Finished initial sponsors page * Added sponsor file * Finished sponsor page * Finished sponsors page * Fixed margin style * fixed modal * Finished using enquiry form now * removed old data from sponsor * Removed message sent from enquiry * Fixed PR comments * hackfix for logos for now * Finished sponsors page * fixed modal * Fixed PR comments * CW-156 Resources Component (#72) * Add Vue testing - jest. * Add code coverage. * Add Preview component and test. * List tests that should be passed. * Remove package lock. * Add preliminary testing for basic code. * Rename item subtitle to description. * Add Preview component to live test. * Update error message for helpers. * Allow live reloading * Remove deprecated tags. * Add to test. * Implement preview image container. * Deleted commented routes. * Add API request for resources. * Fixed grammatical error in error msg. * Add frontend api request for preview. * Add dependencies and resources. * Delete resources data. * Remove divider for last resource. * Add dummy images. * Refactor fetch to be inside component. Instead of having Home.vue pass the prop it is fetched directly in the file. This is because it's hard to set default constant values fetched from API because it is not fetched yet and doesn't re-render when it does. Will ask what the team think or if there are other work arounds. * Apply wireframe design. * Add links to the resources. * Edit testing for preview frontend. * Update API docs. * Update resourcing route to be more abstracted. * Remove duplicate mongo dependency. * Suppress vue warnings in Vue test. * Refactor mounted function to parent component. * Add meaningful test. * Open links in new tabs. * Update README.md (#74) * Update README with latest practices. * Edit CI workflow to allow frontend testing. * Fix syntax error. * Fix syntax error. * Install frontend testing dependencies. * Remove specific npm install. * Remove frontend testing CI workflow. * Start backend test without frontend container. * Update for frontend testing. * Update README.md Implemented changes suggested by Sergio. * CW-162 Slideshow component (#73) * CW-162 Create an InfiniteSlider component This component was adapted from: github.com/biigpongsatorn/vue-infinite-slide-bar :) * CW-162 Rename component to InfiniteSlideshow * CW-162 Add placeholder banners Placed some Facebook Events banners for now. * CW-162 Place InfiniteSlideshow component on the landing page * CW-162 Adjust the speed of the slideshow based on feedback * CW-153 Events on homepage (#75) * use JS strict equality * Update event card design * CW-158 Landing Page (#76) * csesoc mission header and text showing * fixed padding for smaller widths * header updated and title font larger * added sponsor us section to front page * 'sponsor us' button now links to /sponsors * CW-167 Refactor code and folders (#77) * CW-167 Remove unused category and post backend modules If they weren't used for Content Syndication there's is no point on keeping legacy code. * CW-167 Rename EventGrid classes to match convention Removed the event__* prefix because, since the styles within this component are _scoped_ there's no need to differentiate them from other classes using the same class names. * CW-167 Remove unused ListComponent This was used in the main page to show links to the latest events. This has been deprecated by the EventGrid component. * CW-167 Fix spacing, ordering of sections and css naming conventions across the components folder * CW-167 Delete deprecated/unused pages These were mostly placeholder pages, or pages for features that won't be implemented. * CW-167 Comment out placeholder links from Menu component * CW-167 Remove unused components: LoginForm, Sidebar and Slider * CW-167 Fix spacing and remove odd import * CW-167 Add error message to FAQ test * CW-167 Refactor code folders (part2) (#78) * CW-167 Remove shop from menu Since this is not part of our MVP there is no point of leaving this here as it might make next year's team feel like they have to implement it. * CW-167 Remove commented out stuff from backend files * CW-167 Create util to fetch JSON files Reading from the static JSON files is taken care off by a single function. * CW-167 Write meaningful error messages in testing files * CW-167 Add validation to all structs from the backend * CW-167 Make the layout of backend files consistent * CW-167 Rename Events' struct names to match suggested naming convention Changed to what go-lint suggested. * CW-167 Rename Sponsor struct's fields to match naming convention go-lint suggest this change. * CW-167 Fix faq and social verification after reading from JSONs I had to verify each element in the list, rather than the whole list. * CW-167 Fix Social struct verification * CW-167 Fix godoc * CW-167 Remove dot imports and rename public functions * CW-167 Rename echo instance groups and use default method for importing local modules * CW-167 Group structs when there is more than one Grouped structs in events.go and mailing.go into a single type(...) declaration. * CW-167 Add 'name' fields to views * CW-167 Add comment blocks at the start of every Vue component file The comment block contains: name, description, props. * CW-167 Fix up Footer component layout * CW-167 Add comment blocks at the start of every Go module file The comments include: title, description. * CW-167 Add comments to frontend view files and fix typos * Fix spelling mistake. Co-authored-by: Tommy Truong <[email protected]> * CW-171 PR Review Guidelines (#81) * Add thorough descriptions to each heading. * Add description as to what should be a comment. * Direct PR writers to delete lines in italics. * CW-165 Frontend Testing (#82) * Remove frontend testing. * Add intitial files and folders for cypress.io. * Allow console.log in Vue templates. * Implement better error handling for empty lists. * Remove redundant router link. * Remove redundant router links. * Add cypress data tag to preview image. * Write tests with comments for preview. * Rename to realign with what is tested. * Update README.md (#83) * CW-173 Update all dependencies (#84) * Remove conflicting css preprocesser. * Run yarn upgrade. * Update dependencies. * Update vue plugins. * Update SASS loader. * Update last outdated vue eslint dependency. * CW-173 Eslint Errors (#86) * Remove conflicting css preprocesser. * Run yarn upgrade. * Update dependencies. * Update vue plugins. * Update SASS loader. * Update last outdated vue eslint dependency. * Fix all eslint errors. * CW-173 SASS Setup (#87) * Remove conflicting css preprocesser. * Run yarn upgrade. * Update dependencies. * Update vue plugins. * Update SASS loader. * Update last outdated vue eslint dependency. * Add starter sass files. * Fix all eslint errors. * CW-175 Cypress linting (#89) * CW-175 Add eslint-plugin-cypress js package This is to add linting capabilities for Cypress files through ESLint. * CW-175 * CW-175 Update Preview Cypress file to adhere to new linting standard * Update README.md * CW-173 SCSS Components for Stylesheet (#88) * Reorganise files for intuitive hierarchy. * Add grid system. * Add Resources to test scss grid system. * Resolve import lint error. * Resolve import lint error. * Add resources page to test scss. * Add global import for scss import file. * Remove grid scss system. * Create template for typography. * Refactor main vue. Upon reading documentation for Vuetify and its Application Service, it was found that the structure in App.vue did not adhere to the layout defined by Vuetify. * Remove unused fonts. * Revert comment of font family. * Remove font family variable. * Update text scaling ratio * Fix text scaling and add space values. * Implement grid system and grid mixin. * Adhere to BEM-like naming convention. * Resolve differences in Windows line ending. * CW-173 Spacing SCSS (#91) * Refactor spacing variables into its own scss. * Implement basic spacing and related mixins. * Move spacing import above typography. * Remove default spacing. * CW-173 Colour SCSS (#92) * Add linear gradient. * Update _linear-gradient.scss * CW-176 Merge form components (#90) * CW-176 Integrate FeedbackForm into EnquiryForm The type prop now supports "feedback" as well. * CW-176 Update form usage in the Engage page * CW-176 Rename EnquiryForm -> MailingForm * CW-176 Simplify email validation The `email` rule now works with both *General* and *Feedback* forms. * CW-176 Fix logic around the *rule* prop of a text field * CW-176 Introduce isType function to increase readability * CW-176 Add asterisk to required fields * CW-176 Use 3rd party to validate emails We are using validator.js to validate emails. * CW-173 CW-182 Grid and Spacing Adjustments (#93) * Display every combination of the grid system * Change vertical gap * Remove flex top margin and fix math round error. Co-authored-by: Tommy Truong <[email protected]> * CW-159 - Front page (bottom half) (#80) * Join us section added * zoom to logos in 'join us' when hovering * joinus button now links to joinus * community links are now a component * fixed bug with component import order * CW-177 Mailing form testing (#94) * CW-177 Test label names of the mailing form * CW-177 Test button enable/disable based on verification * CW-177 Use tab switching on the forms in the Engage page * CW-177 Ensure the general tab is selected by default in Engage page * CW-177 Simplify testing from feedback given to improve performance and reduce repetition * CW-177 Fix not-required field validation * CW-177 Ensure that the form exists on the Engage and Sponsor page * CW-173 Button SCSS (#96) * Add button scss. * Rename files consistent with style guide. * Add mixin for font smoothing. * Complete inital button implementation. * CW-173 Icon SCSS (#95) * Add icon utility classes. * Change icon scss location. * CW-178 Infinite slideshow testing (#99) * CW-178 Init testing file for InfiniteSlideshow * CW-178 Add testing for the InfiniteSlideshow component Since Cypress is not tuned for visual testing, we are going to ensure that the banners are present and that the css animation properties are set. * CW-179 Revise Typography Guide (#98) * Display every combination of the grid system * Change vertical gap * Upload the font files * add new typography hierarchy * adjust the line height of the paragraph * fix incomplete comments * Upload svg file for fonts * Recover the import of fonts and update the button * Remove Quicksand font from development. * Import CoreSansC through font-family. * Moved fonts into assets. * Move fonts to styles folder. * Upload new fonts weights * Remove font family from variables. * Add full font folder. * Import fonts from assets folder. * Install css-loader due to creation of css. * Rename font families to import all in one go. * Remove fonts from styles folder. * Correct font weights to align with the styleguide Co-authored-by: Tommy Truong <[email protected]> * CW-202 Update Engage forms (#100) * CW-202 Update form selection in the Engage page This was to implement the new wireframe. * CW-202 Fix form required asterisk placement The asterisk is now added through :after CSS rather than as a <span>. * CW-202 Put arrow next to the SEND button This is in accordance with the wireframe. * CW-202 Update Cypress tests Since Cypress can't test the :after CSS decorator natively, I'm testing for the precense of the required class instead. I also changed the way forms a switched on Cypress and added all necessary data-cy attributes to tags. * Extend JWT expiry timestamp (#101) Added 3 more months to the JWT used for testing. The new expiry timestamp is 2020-11-25 at 3:38pm (AEST). * Remove testing for FAQ. (#102) * Fix button font size. (#105) * Update events.go to read the Facebook token from .env (#107) * Update events.go to read the Facebook token from .env * Update events.go to read the Facebook token from .env * CW-201 Cypress Testing (#104) * Reduce occurrence of action on push commits * Add cypress action to ci workflow. * Fix invalid working directory. * Change invalid relative directory address. * Remove working directory reference. * Revert to old ci.yml. * Add relative path. * Add cypress testing functionality. * Test correct folder. * Update ci.yml * Update ci.yml * Update ci.yml. * Remove comment. * Update ci.yml. * Remove cypress container. * Revert to old testing. * Test a frontend workflow. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Update ci.yml. * Clean up ci.yml. * Remove faq testing due to error in debugging. * Remove preview testing as it is now unsupported. * Rename job workflow. * Remove directory check. * CW-203 Menu redesign (#106) * CW-203 Make the Menu component cover the navigation bar * CW-203 Redesign page links * CW-203 Redesign social links * CW-203 Fix social links' alignment * CW-203 Align links to match wireframe * CW-203 Rearrange and activate social links * CW-203 Add night-mode icon * CW-203 Fix alignment by employing flex containers * CW-203 Replace div spacer blocks with margins * CW-203 Replace flexboxes with Vuetify's grid system * CW-203 Adjust the size of page links * CW-203 Add close button This change makes the close-by-background-click redundant. * CW-203 Increase the size of page-links hover * CW-213 Load SVGs by defining a width and height (#110) Solution from: https://stackoverflow.com/questions/25927208/svg-in-img-tag-not-loading-as-image-in-firefox * CW-214 Menu nitpicks (#111) * CW-214 Replace footer `div` with `v-row` * CW-214 Insert breakpoints to make links more intuitive in xs screens Accoding to Vuetify, an xs screen is < 600px. * CW-214 Fix jitter around social links by reducing the link clicking area * CW-214 Make social links open in a new tab * feat/home page (#108) * added tests for static text and images in the landing page join us * testing for join us button on front page, not passing as of now * added comments to error in community links testing * removed failing test for PR * fixed spelling mistakes communitLinks->communityLinks * removed unnecessary TODO * Ignore any video output from Cypress runs (#109) * Ignore any video output from Cypress runs * Ignore screenshots produced by failures * CW-212 Match CSS spacing to design guidelines (#112) * Fix the spacing values * Fix the spacing value on the internal link * Remove extra padding in menu links * Ensure menu footer display with correct spacing * Change the units to em * Change the units to em * Resolve typos * Remove extra whitespace. * Change the spacing unit to px * Remove extra space Co-authored-by: Tommy Truong <[email protected]> * CW-209 CW-211 : Landing page showcase and mission (#115) * refactored join us button (in progress) * hover to join us button and correct typography to showcase * added images for landing page and removed old code * added header background image, sizing still work in progress * header background image correctly sized * landing page mission image added, no gradient yet * fixied spacing * Move typography and button into home.vue and fix font for mission paragraph * Standardise whitespace. * delete TODO comments and seperated showcase and community link tests Co-authored-by: Tommy Truong <[email protected]> * CW-155 Footer redesign (#117) * Started footer * inital framework for footer * Finished footer * CW-190 Footer Testing (#116) * Add testing for logo and address * Add testing for internal links * Add testing for external link * Add comment for the internal link test * Add media links testing * Add the resource links test * Apply scss variables to the footer.vue * Resolve conflicts * Add cypress tracking variables on each tag * Fix the interaction on footer * Update cypress dependency * Refactor footer testing * CW-208 : Landing Page Sponsor (#119) * added comment to start of each section in home.vue * add correct style to header and button * fix variable names * add icon images * move across to v-row and v-col * fix button alignment * added correct background and image spacing for icons * add comments to css * remove @extend to h1, h4 and p * revert back display:inlineflex for buttons and fix hyperlink underline in sponsor us button * CW-225 : Landing Page Join Us (#120) * update h1 and h4 in join us section * put join us icons into v-cols * add text below join us icons * add padding to bottom margin of join us section * add comments * add back cypress tags * CW-206 Event design (#118) * Add new event card design * Display all events * Implement sliding component for events * Fix scaling of displayed events * List events on mobile * Handle the case of event data not being updated for over 60 days, such as in the case of an expired token. * Fix style in EventDisplay * Open events in new tab * Update header comment of EventDisplay * Remove invisible spaces on newline * CW-207 Landing page resources (#122) * CW-207 Basic layout for the Student Resources * CW-207 Add background gradient and images to the Student Resources section of the landing page * CW-207 Add rounded corners to all boxes * CW-207 Fix rounded corners * CW-207 Activate button links * CW-207 Add grow on-hover effect on images The hover area is the whole box, but only the image grows. * CW-207 Increase text left/right padding * Write tests for events on both desktop and mobile (#123) * CW-226 Wording fixes (#124) * Make minor grammatical fixes * Fix line lengths * Update Discord link * Update social links * CW-223 Resources testing (#125) * CW-223 Add Cypress data tags to relevant HTML elements * CW-223 Add Cypress tests for the resources section of the landing page * CW-223 Account for webkit transform properties * CW-205 Menu testing (#126) * CW-205 Create Menu tests These tests check both, the functionality of internal page links, and the presence of external social links. * CW-205 Refactor Menu by abstracting the social links' to data * CW-229 Make sponsor logos interactive on hover (#130) * Add hover effects * Fix hover effects * Remove accidental files * Remove extra line * Reintroduce faq_test.go (#131) * CW-224 Living style guide (#121) * Add color style guidelines. * Add colour import to global. * Add styles to the styleguide. * Add styles to styleguide. * Clean typography comments. * Add buttons style guide. * Add content living style guide. * Add kss script. * Refactor body and html css. * Refactor showcase to match content css guidelines. * Add typography style guide. * Apply style guide to headertitle. * Apply guidelines to mission section. * Refactor Home into own folder. * Remove commented code for mission. * Change the route to match new Home destination. * Add margin to the top of titles. * Remove padding from top. * Change height value to 100%. * Refactor showcase out of home. * Refactor Mission out of home. * Refactor Sponsor Us out of home. * Correct imports for components. * Add styleguide for icons. * Fix indentation. * Update HeaderTitle to correct subtitle sizing. * Update community links to match style guide. * Fix indentation. * Simplify testing. * Simplify testing pt. 2. * Correct indentation. * Add page comment. * Match with Abiram's changes. * Move EventDisplay to Home views folder. * Update events in line with style guide. * Add bottom padding to headers. * Correct SVG v-img bug. * Update living style guide. * Refactor Slideshow into own Vue file. * Refactor Resources into own Vue file. * Update views based on refactored components. * CW-235 Disable Swagger for deployment (#132) Disabling Swagger for deployment seemed like a reasonable thing to do to prevent the unnecessary exposure of the website’s backend. * CW-230 Dockerfiles for Production (#133) * Create production Dockerfile. * Add extra paths to serve static files. * Add newline for Dockerfile. * CW-242 Engage form switch (#134) * CW-242 Make the Engage form toggle mandatory This is to ensure that either "Enquiry" or "Feedfback" is selected at all times. * CW-242 Fix error in email rule where the value is undefined This is a silent error that floods the console. * CW-96 Restructure Database to become more generic (#135) * CW-96 Store Faqs on the database This involves parsing the JSON file and putting its contents in the database. All subsequent get requests are read from the database. * CW-96 Store Social links on the database This involves parsing the JSON file and putting its contents in the database. All subsequent get requests are read from the database. * Fix Resources Swagger router typo * CW-96 Convert setup database queries from UPDATE to INSERT * CW-96 Remove unused `id` field from social links * CW-96 Update social.json to reflect changes to the Socials struct * CW-96 Update Swagger with new Social model * CW-138 Docker Security (#137) * Clean up Dockerfiles. * Prevent escalating privileges. * Allow only read-only for containers. * Remove read only from mongo container. * CW-228 Removing JWT secrets (#128) * Read JWT signing key from environment variable * Read testing JWT from environment variable * Fix non-constant initialiser * Inject TESTING_JWT into Golang CI Tests * Remove newline * CW-245 Duplicate database keys (#139) * CW-245 Employ upsert when initalizing Faq * CW-245 Employ upsert when initalizing Social * CW-244 Move mailing constants (#138) * CW-244 Move mailing constants * CW-244 Employ Info and Sponsorship development emails * Add fonts to static dist files to be searched by server (#141) * Update README.md (#142) * Update README.md * Update README.md * CW-231 Refactor Data (#143) * Remove outdated preview component. * Convert mission to a data prop. * Refactor slideshow banners into data props. * Refactor student resources into data props. * Refactor quote into data props. * Scale images to match container height (#145) * CW-234 Reponsive Landing Page (#144) * Remove outdated preview resouces. * Readd slideshow component. * Hide components at lower breakpoints. * Change breakpoints to match Vuetify's. * Remove outdated preview resouces. * Readd slideshow component. * Hide components at lower breakpoints. * Change breakpoints to match Vuetify's. * Optimise showcase image for all screen sizes. * Change breakpoint to match Vuetify. * Recalibrate css for rescaled showcase image. * Remove grid variables. * Remove breakpoints variables from mixin. * Change type scall to depend on base size variable. * Simplify breakpoint mixin. * Refactor text size variables. * Introduce use of breakpoints mixin for text size. * Remove comment. * Include breakpoint for medium size devices. * Comment out background image. * Reinitialise height for mission component. * Remove small box on smaller screens. * Add responsive layout to logos and text. * Create responsive background image. * Scale images to match container height (#145) * Remove outdated preview resouces. * Readd slideshow component. * Hide components at lower breakpoints. * Change breakpoints to match Vuetify's. * Remove outdated preview resouces. * Readd slideshow component. * Optimise showcase image for all screen sizes. * Change breakpoint to match Vuetify. * Recalibrate css for rescaled showcase image. * Remove grid variables. * Remove breakpoints variables from mixin. * Change type scall to depend on base size variable. * Simplify breakpoint mixin. * Refactor text size variables. * Introduce use of breakpoints mixin for text size. * Remove comment. * Include breakpoint for medium size devices. * Comment out background image. * Reinitialise height for mission component. * Remove small box on smaller screens. * Add responsive layout to logos and text. * Create responsive background image. * Change background imgs to suit responsive layout. * Add agnostic mission image. * Remove old mission image. * Remove bottom padding. * Add mission image to landing page. * Refactor to help with clarity. * Open links in new tab. Co-authored-by: abiram <[email protected]> * CW-255 Mission Testing (#146) * Create testing file. * Remove commented out styles. * Rename test. * Add mission testing. * Add to test such that statement contains words. * Use img tag rather than v-img. Due to the fact that v-img lazily loads their images, cypress cannot detect the visibility of the image. No immediate disadvantage to using one over the other but for the cases of 'visible' cypress test best to use img. * Update README.md Missed a key prerequisite, Golang and Yarn. * Change failure tag to conform to API guidelines. (#149) * Update testing variables and processes. (#151) * Remove middleware. * Remove middleware import. * Update cypress github action to version 2. Co-authored-by: Tommy Truong <[email protected]> * CWC-259 Transparent App Bar (#150) * Change failure tag to conform to API guidelines. * Make the app-bar transparent. * Remove elevation from app bar. * Update version number. Co-authored-by: gawdn <[email protected]> Co-authored-by: Sergio Mercado Ruiz <[email protected]> Co-authored-by: Sergio Mercado Ruiz <[email protected]> Co-authored-by: paulatennent <[email protected]> Co-authored-by: jchen <[email protected]> Co-authored-by: Paula Tennent <[email protected]> Co-authored-by: abiramen <[email protected]> Co-authored-by: boboeee <[email protected]> Co-authored-by: JarvisW <[email protected]> Co-authored-by: Jarvis Wang <[email protected]> Co-authored-by: Tommy Truong <[email protected]>
- Loading branch information