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

More automated way to add an event #17

Open
TDHTTTT opened this issue Sep 17, 2020 · 8 comments
Open

More automated way to add an event #17

TDHTTTT opened this issue Sep 17, 2020 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed LOW

Comments

@TDHTTTT
Copy link
Contributor

TDHTTTT commented Sep 17, 2020

When adding a new event to the event.html, I found 2 potential issues (which of course can be avoided with some labor):

  1. A lot of boilerplate code which could be solved using some js templating like mustache.js
  2. You have to put the event in the correct location chronologically, which is not such a big deal for new event, but if we later want to include a older event, we have to painstakingly find the right spot for it. Some js might help.

Edit: For 1, it would be awesome if we can extract all the data part from the event into a database (e.g. json) and load it using js. The separate code, database makes it cleaner and easier to maintain imo.

@TDHTTTT TDHTTTT added the enhancement New feature or request label Sep 17, 2020
@omarcostahamido
Copy link
Member

not sure I follow.
If you could create a branch with an example of that for a couple event entries that would be helpful.
Thank you

@TDHTTTT
Copy link
Contributor Author

TDHTTTT commented Sep 17, 2020

            <li>
               <div class="event__info">
                  <span id="edate">10/05/2020</span>
                  <span>
                    Qiskit Hackathon Global <a href="https://qiskithackathon.global.bemyapp.com/#/event">[link]</a>
                  </span>
               </div>
            </li>
            
            <li>
               <div class="event__info">
                  <span id="edate">09/29/2020</span>
                  <span>
                    UCI Virtual Booth <a href="https://www.google.com/calendar/event?eid=ODJ2ZmRwNmhjMTg4bGNiZzVkbGN1NW5rNjAgY192Y2ZhcjJqM3JtYThqZXJxc3JncTFnZThzOEBn&ctz=America/Los_Angeles">[link]</a>
                  </span>
               </div>
            </li>

👆2 event entries.

  1. If you do a diff then everything that remains the same is "boilerplate code". 
  2. If you want to add an event say for example 10/01/2020, then you have to compare manually the edate of 10/01/2020 and those of the existing events in order to put it in the correct location

Makes sense?

@omarcostahamido
Copy link
Member

That part I get, yes. The thing that was not clear for me is how to add mustaches.

@TDHTTTT
Copy link
Contributor Author

TDHTTTT commented Sep 17, 2020

That part I get, yes. The thing that was not clear for me is how to add mustaches.

I haven't tried mustaches. But based on this stackoverflow answer I think it is doable in our case. We might even be able to make the event a separate json/csv file to load into the template!

@omarcostahamido
Copy link
Member

I understand that it could be doable, but for me personally it would take much more time studying handlebars or mustache and figuring out how to implement it in our case, rather than just copying pre formatted 8 lines of code.
I guess I was hoping you had some experience with it already, in which case I would be willing to look at a small example and them continue for the rest of events.

@TDHTTTT
Copy link
Contributor Author

TDHTTTT commented Sep 18, 2020

To be clear, I am not suggesting mustaches should be the preferred way. It is just the idea of keeping data and code separate prompts me to look for a component/template engine since frontend framework like React has heavy focus on re-usable component. Also, it could open up workflow like google sheet -> json -> event.html.

Yeah, it is a quality of life feature with low priority.

@omarcostahamido omarcostahamido added the help wanted Extra attention is needed label Sep 25, 2020
@andyyPark
Copy link
Collaborator

@all-contributors please add @TDHTTTT for code, bug

@allcontributors
Copy link
Contributor

@andyyPark

I've put up a pull request to add @TDHTTTT! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed LOW
Projects
None yet
Development

No branches or pull requests

3 participants