Code Monkey home page Code Monkey logo

newdle's Introduction

Newdle CI Status License Made at CERN!



Newdle is the new, shiny tool brought to you by the Indico Team @ CERN ๐ŸŽ‰ Here at CERN we hold a lot of meetings. While Indico makes it super easy to manage those meetings, we still lose a lot of time ๐Ÿ“ˆ trying to schedule them, which usually involves numerous emails and private messages. That is what newdle has been created for: to streamline the process of choosing the perfect date and time ๐Ÿ—“ for your next meeting/event.

Newdle is part of the MALT project.

A sneak peek of Newdle

Why another tool?

It's true that there are already several commercial and Open Source solutions available that provide ad-hoc "polls". However, we have noticed that none of those tools seem to offer, at the same time, a user-friendly and modern interface and the additional freedom and flexibility that come with being part of an Open Source ecosystem. Additionally, none of them seem to seamlessly integrate with other enterprise systems.

Integration

newdle can currently fetch free-busy information from Exchange servers. This information can be used while deciding on candidate slots ("when is everyone free?") as well as when answering to a "poll" ("when am I free?"). We are currently working on integrating with other providers.

newdle is also developed by the same people who are behind Indico, and that's not by pure chance. newdle naturally complements Indico, as it targets what comes immediately before the actual creation of a meeting. This is why we would like to have the possibility to create meetings on Indico once a final date is decided (still work in progress!).

Development

We chose Python 3.12 as the backend language, so make sure you have it installed (pyenv helps if your distribution does not include it). To prepare the development environment it is enough to run make which takes care of installing all required dependencies inside a new virtualenv. Typically that will be the .venv directory unless you override the environment variable VENV e.g. VENV=.virtualenv make. Activate your virtualenv using source .venv/bin/activate since this is required to run the various flask comments that come later.

Make sure you have the python binary in your PATH. You can also use the PYTHON environment variable to override the location of the python binary. e.g.:

$ PYTHON=/usr/bin/python3.12 make

Database schema

Before running the alembic migrations make sure you have created a database called newdle (or adjust the config file). Having done that, run flask db upgrade to upgrade the schema.

Running the development server

To run the dev servers, use make flask-server and make react-server (in separate terminals). You can use the FLASK_HOST, FLASK_PORT and REACT_PORT environment variables to override where the dev servers will listen (make sure to set it for both dev servers, since the React server needs to know where the Flask app is running).

Once everything is running, you can access the webapp on http://127.0.0.1:3000 if you did not change any of the ports.

Use the BROWSER environment variable if you want to prevent new browser windows being opened every time you run make react-server.

BROWSER=none make react-server

Other available make targets

We provide a couple of additional make targets that should streamline the development process:

  • make clean - removes all generated files
  • make distclean - runs clean target first and removes config files afterwards
  • make lint - runs linters, which report possible code style issues
  • make format - runs code formatters over the entire codebase (ruff, prettier)
  • make test - runs Python and React tests
  • make build - builds a Python wheel which then could be used to install newdle in production

Develop with docker compose [beta]

  • make docker-dev-run - Build and runs the containers. Once everything is running, you can access the webapp on http://127.0.0.1:3000
  • make docker-dev-clean - Stops and destroys the images and containers
  • make docker-dev-shell-react - Bash the react-server container
  • make docker-dev-shell-flask - Bash the flask-server container

Run newdle with docker compose

:info: Production like environment

  • make docker-run - Build and runs the containers. Once everything is running, you can access the webapp on http://127.0.0.1:8080
  • make docker-clean - Stops and destroys the images and containers
  • make docker-shell - Bash the newdle container
Made at CERN
Take part!

Note

In applying the MIT license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

newdle's People

Contributors

andramazo avatar caetan95 avatar dependabot[bot] avatar diego-zulu avatar hannahshort avatar iokasti avatar javfg avatar jhunterhobbs avatar leats avatar lgatting avatar mic4ael avatar micsucmed avatar mvidalgarcia avatar nagy3n avatar nidble avatar nop33 avatar panagiotappl avatar patriciamape avatar pferreir avatar plourenco avatar rpanczer avatar ruhci28 avatar saibot94 avatar sanskagarwal avatar subhashissuara avatar thiefmaster avatar this-santhoshss avatar tomasr8 avatar virtualevan avatar yarons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newdle's Issues

Answer page: anonymous participant

Right now we are required to have a "participant code". In the case of a user who is given the link to the newdle, we won't have neither their name nor availability. We should provide a page which asks for their name and shows no availability info.

Component: Create Newdle

This is the page for creating a new...dle. While we don't have the components yet that should go there, we can put placeholders for them and setup the CSS to arrange everything nicely.

Improve README

Some things which are missing:

  • app logo;
  • badges (only TravisCI for now?);
  • small intro saying what the app does;
  • CERN footer like the one we have on the Indico README;
  • ... any others?

Nice splash page

We need some sort of "welcome" page that visitors will see once they open the tool.
Please, let's discuss some mockups beforehand.

Answer page: allow day transitions

This can be achieved in two ways:

  • "Back and forth" arrows, which should be added in accordance with the mock-ups;

image

  • Clicking on a day, just like when setting up a newdle;

Component: Calendar

This is the calendar (react-dates?) where you select a day on which to see participant availability & add time slots.

Days that have time slots should be highlighted so it's clearly visible which days are used. Removing the last time slot from a day should remove this highlight.

The active day should be highlighted differently regardless of whether it has time slots or not.

Better answer editing UI

It's already possible to edit an answer by knowing its URL. However, the UI is not very clear.
I suspect, however, that we will need some way of figuring out whether it is the first time the user is answering that particular newdle, so that we can show the button as "Save answer" or "Submit answer", for instance. Rather than adding yet another column to the Participant model, we could just check whether answers is empty. Opinions?

"Newdle summary" page (basic page only)

This page should serve both as the "final page" after a newdle gets created and something the creator can come back to to see the status of the newdle. It should display:

  • a summary of the participants and selected options as well as their choices;
  • the link to the newdle that can be shared with the participants;

image

image

Reset Newdle creation

Right now it's impossible to reset the current state data without either creating a newdle or reloading the page. If the user wants to start from scratch, they should be able to.
An option could be to add some 'beforeunload' logic that triggers also whenever someone tries to access /.

E-mail participants

Participants should receive an e-mail with a unique link to their answer page.

Component: User Menu

Main UI is an avatars (using Gravatar, with https://ui-avatars.com/ or somehing similar as a fallback)

When clicking it, opens something dropdown-ish containing:

  • Login/Logout (just show one for now and keep the other one hidden - we'll update that once the login code is ready)
  • Your full name/email?

Or do we want to show something completely different while not logged-in? Probably something to see later; for now having a Login action in there is the easiest option.

Add support for timezones

Dates/times should be already timezone-aware in the backend, so not much should need to be done.

  • We should add a timezone selector in step 2, which could default to the user's client timezone;
  • When creating the newdle, we should send the selected timezone along with it.

Add newdle creation API

Basically something like POST /newdle/new, which creates a new newdle with given participants (if any).

Answer page: Improve timeline

  • expand timeline when newdle has time slots out of default hours range
  • make sure time slots that end at midnight are displayed properly

Improve "change xxxx" options in last step

They currently look like this:

image

I think it's not very readable and we could probably come up with something better. One option would be two buttons, one with a one-arrow icon and the other one with a "fast" forward double-arrow icon.
I also think that making step indicators clickable would help a great deal with UX.

image

Newdle creation: display number of created time slots

Currently the user does't have a good overview of selected timeslots
The idea is to display the number of all currently created time slots on the page below.

image

We could also consider listing chosen time slots (simple list with dates and times)

Step 3 - Finalize newdle

At this point we should ask the user for the event's title. We should also tell the user that the participants will receive an e-mail once they confirm the creation.

POST /api/newdle should be called with the filled in info (also from the previous steps) and then the page should change slightly to reflect that fact that the newdle has been created.

image
image

Add database models

  • Newdle (or some more generic name): stores information such as creator, duration, timezone and final date/time. Time slots can probably be stored in JSONB.
  • Participant: linked to a Newdle, stores name etc. and has a JSONB column for the user's answers.

Why JSONB for time slots / answers?

  • Modifying a Newdle is not planned for now, and it would be an atomic operation anyway. So there is no need to edit/add/remove individual time slots.
  • When a user answers, the availability is for a given date/time (which would not change even if that time slot was moved), so storing it as such is more natural than a time slot ID.

Component: Timeline

Displays the timeline listing all participants and their availability. Each participant will be another component (Participant) that's shown inside the Timeline.

Component: Participant

This is a row in the timeline showing name, avatar and availability of a participant.

image

"My newdles" page

A page listing all the newdles the user has created and their current state (finished, ongoing, number of answers...).

Send e-mail from "final" page

We should add a button next to "create event", which would send a simple e-mail to all known participants whose e-mail address we know about. The mail should just announce what the final date is.

Component: Navigator

  • Shows in which creation step you are
  • Shows a title/description of that step

Could either be generic (props: steps, current, title, description) or specific to the steps we have (props: step). Generic is probably cleaner since that way the parent component handles the data shown in it.

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.