Giter Club home page Giter Club logo

cake's Introduction

Cake

Experimental new frontend for OAE

Project status

CodeFactor Depfu Depfu FOSSA Status

Project standards

Datree code style Conventional Commits

Get started

Install the dependencies...

npm install

...then start Rollup:

npm run dev

Development

Use http://guest.oae.com for testing.

Use http://guest.oae.com?url=%2F%3FinvitationToken%3DhA7EFd5wYudH%26invitationEmail%3Dmiguel.laginha%2540apereo.org for testing invitations and other url parameters.

If you're using Visual Studio Code we recommend installing the official extension Svelte for VS Code along with several others:

(The official Prettier extension is included in Svelte for VS Code)

Here are some settings you might need (paste them onto settings.json):

  "[svelte]": {
    "editor.defaultFormatter": "svelte.svelte-vscode"
  },
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  },
  "eslint.validate": ["javascript", "svelte"],
  "svelte.plugin.typescript.enable": false,
  "svelte.plugin.svelte.format.enable": true,
  "svelte.plugin.svelte.enable": true,
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,

Tests and validations

Run translation tests (node) with npm run test-translations.

Run svelte-check with npm run validate.

Run linting check with npm run lint.

Run (S)CSS linting with npm run lint:css.

Debugging

With VSCode use the following configuration (launch.json):

    {
      "name": "Launch Chrome",
      "type": "chrome",
      "request": "launch",
      "sourceMaps": true,
      "url": "http://guest.oae.com",
      "webRoot": "${workspaceFolder}/www"
    },
    {
      "name": "Launch Firefox",
      "type": "firefox",
      "request": "launch",
      "reAttach": true,
      "reloadOnAttach": true,
      "url": "http://guest.oae.com",
      "webRoot": "${workspaceFolder}/www"
    }

Building and running in production mode

To create an optimised version of the app:

npm run build

You can run the newly built app with npm run start. This uses sirv, which is included in your package.json's dependencies so that the app will work when you deploy to platforms like Heroku.

Deploying to the web

With Vercel

Install vercel if you haven't already:

npm install -g vercel

Then, from within your project folder:

cd public
vercel deploy --name my-project

With surge

Install surge if you haven't already:

npm install -g surge

Then, from within your project folder:

npm run build
surge public my-project.surge.sh

Testing your PWA's performance

We recommend using https://www.webpagetest.org/easy with the Run Lighthouse Audit option turned on. This will give you an in depth look into your app's load performance on the average device connected to the average network. For more info on how to use webpagetest check out this article

cake's People

Contributors

brecke avatar ritaoak avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ritaoak brecke

cake's Issues

Add i18n mechanism

Subtasks:

  • Install svelte-i18n
  • Try to think of a way to register several i18n files at once
  • Integrate with crowdin (new project?)
  • Tool or mechanism to convert properties files to json
  • Use the locale setting that the backend returns when fetching the current user
  • Switch current test translations to converted translations from 3akai-ux

Get open source icons for social media logos

On the authentication modal window there are icons for twitter, google and facebook buttons, but we need ones we can use without attribution. Not important just yet, but let's not forget to do this.

Homepage: Redesign primary sections

As a restructuring of the platform homepage, we will need to redesign the primary sections. This will help with structuring the landing page so we are able two include two distinct functionalities:

  • project
  • product

The idea is to show the two distinct functionalities associated to the OAE. While the project section aims to inform users that there is an open source github repository they can contribute to, the product section is intended a showcase/demo of the some of the platform features.

Right now, we're starting with a redesign of the primary top section, as will be shown in the following mockups (soon to be added).

Display the custom tenant logo if it exists

Right now we're just displaying the default one if the server replies shared/oae/ui/oae-logo.jog or a custom one if the server replies something else (like, the real one)

Add tests to homepage / home-nav / modal signin window

Activity Feed: Create mockups for every activity example

The /dashboard and /group pages each are structured to display an activity feed that includes several types of files and user activity items. So far, we have the following (non-exhaustive) list of activities:

  • File (.doc, .docx, .jpg, .png, .pdf)*
  • Link
  • Discussion
  • Folder (Label)
  • Group
  • Meeting
  • Etherpad
  • Ethercalc

*most common type of activity. Contains a small display of the content inside.

To be better understand how these should behave, we need to create a series of mockups to analyse dynamic behaviour and put them up for review.

UPDATE:

Some details we need to take care of:

  • Redimension the thumbnails properly
  • Give them a banner or some kind of overlay with extra information:
    • Type of content (link, folder, document, etc)
    • Visibility
  • Visibility needs to be given a visual representation (similar to the one OAE has right now) for public, private and loggedin
  • The text currently does not respect the boundaries of the div it's put into

Sidebar: Replace avatar with `Logout` button

Adding the logout button in prominence for the sidebar is more straightforward for the user. This way, we can include the avatar, notifications icon and the dark/light mode toggle in a section on top of the main content. This section also includes the search bar.

Library: Include folder section in the library

There should be a folder/label section visible so that the user can access all the files within at once and have them displayed as a mosaic or table.

NOTE: navigating within a folder will activate the breadcrumbs.

Fetch the activity feed once logged in

I'm leaving the paginating for another issue, as well as infinity scrolling.

Update:

  • Convert previous ActivityItems model to a new one
  • Transform activity and activity collection description (humanize sentences)
  • Apply i18n

Add types to homepage / home-nav / modal signin window

Create CI pipeline for the project

Some stuff to check:

  • npm run validate
  • npm run lint
  • npm run lint:css
  • npm run format
  • npm run test-translations
  • npm run e2e-headless
  • Also find a way to run tsc in order to validate jsdoc types

News Feed: Redesign feed cards and implement changes

Given the recent updates, we will need to redesign feed cards to accommodate the changes. We will start with:

  • image cards

The OAE image cards can contain more than one image. Right now, the cards only show the first out of the x images, so we need to find a way to include them all and split the file names.

Dashboard: Fix base layout

Base layout main content div is set to overflow: scroll when the content displayed in the page exceeds the height of the viewport. However, the div itself is scrolling when the scroll should be happening in the browser.

Intercept `http status 419` somehow to popup the TC modal window

In 3akai-ux this is what we have:

    function(oae, $) {
        $.ajaxSetup({
            // Make caching the default behavior for $.getScript
            'cache': true,
            // Intercept 419 status indicating that the user has to accept the Terms and Conditions before continuing
            'complete': function(xhr, textStatus) {
                if (xhr.status === 419) {
                    // Update user status
                    oae.data.me.needsToAcceptTC = true;
                    // Hide any modal that might be open as bootstrap doesn't support 2 modals at once
                    $('.modal').modal('hide');
                    // Insert the Terms and Conditions widget in settings mode
                    var termsandconditionsId = oae.api.util.generateId();
                    oae.api.widget.insertWidget('termsandconditions', termsandconditionsId, null, true);
                }
            }
        });
        // Make sure that arrays passed in as arguments are properly encoded
        $.ajaxSettings.traditional = true;
        // Tell IE9 that cross-domain requests are a possibility when Amazon S3 is enabled
        // as the content storage strategy
        $.support.cors = true;

        return oae;
    }

Homepage migration

When migrating the final version of Biscuit-ux for the homepage, keep in mind the following issues:

  1. The search bar is now in prominence, which means that it will stay centered;
  2. The search bar is on top of a background. This element can be changed by the corresponding tenant to a photo or a solid colour;
  3. The modal must have a z-index higher than any other element in the homepage.

Consider adding the following tweaks in the future:

  1. For 2, include the possibility to drag the background and set it into the preferred position;
  2. Search bar needs a filtering system

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.