UMB-CS-682-Team-03 / tracker

0 stars 0 forks source link

Roundup - Classhelper

<roundup-classhelper>

Why there is need of <roundup-classhelper> in the issue tracker?

What is classhelper comprised of?

There are three main parts of the roundup-classhelper component:

The presence and behavior of these sections can vary depending on the configuration and intended use case of the <roundup-classhelper> component. For example, in some scenarios, the Search Section may not be necessary.

How can you use it?

Keyboard Usage

The <roundup-classhelper> is designed to be fully accessible and navigable using only the keyboard. The tab order and key bindings are as follows:

Mouse Usage

In addition to keyboard navigation, the <roundup-classhelper> component can be used with a mouse or other pointing device:

Guide for using/deploying roundup-classhelper in a tracker

Which tag to use and where to place it.

After adding the <roundup-classhelper>, it should look like this.
<th i18n:translate="">Nosy List</th>
<td>
<span tal:replace="structure context/nosy/field" />
<roundup-classhelper data-popup-title="Nosy List Classhelper - {itemDesignator}" data-search-with="username,phone,roles[]">
   <span tal:condition="context/is_edit_ok" tal:replace="structure python:db.user.classhelp('username,realname,address', property='nosy', width='600')" />    
</roundup-classhelper>
</td>

Setting Attributes on </roundup-classhelper>

Setting the data-popup-title attribute is optional.

Setting the data-search-with attribute is optional.

User ClassHelper

Fallback Mechanism

If the user's browser doesn't support web components, the <roundup-classhelper> will automatically fall back to use ClassHelper link.

Image Title

There is also an emergency mechanism to disable roundup-classhelper and allow the fallback classhelper to be used. Set DISABLE_CLASSHELPER to true in classhelper.js. After force reloading the tracker page, the roundup-classhelper will be disabled without having to edit all the templates and remove <roundup-classhelper>.

Error Handling

Refreshing classhelper.css

In case of issues with the <roundup-classhelper> component, you can try refreshing the classhelper.css file by following these steps:

Adding Roles

Installing and Setup

Copy the following files into your Roundup instance html directory:

After copying these files, you can use the <roundup-classhelper> component in your Roundup templates.

Missing translations

To set up translations for the component, follow these steps:

  1. In your Roundup instance's Demo/locale directory, create a new file if not exists with the name __.po (e.g., de.po for German).

  2. After the header, add the translation entries for the component. For example next and submit are not being shown for German, you can add:

    msgid "submit"
    msgstr "gehen"
    
    msgid "next"
    msgstr "nächste"
    
    msgid "name"
    msgstr "name"

    The msgid here is case sensitive therefore be careful.

  3. Save the __.po file.

  4. Restart your Roundup instance.

This should get you the missing translations, for more details refer roundup documentation for translations.

Development Setup

Clone mercurial repository.

hg clone http://hg.code.sf.net/p/roundup/code roundup

Make python virtual env and activate it

cd roundup
python -m venv .

For linux and mac

source bin/activate 

For windows powershell

.\scripts\Activate.ps1

Install roundup

python -m pip install .

Clone tracker only repo.

git clone https://github.com/UMB-CS-682-Team-03/tracker.git

Init the demo tracker with default ./demo

roundup-demo -b sqlite

Move the files from tracker dir to demo dir

For linux and mac

cp -r ./tracker/**/* ./demo
cp -r ./tracker/.git ./tracker/.gitignore ./demo

For windows powershell

xcopy .\tracker .\demo /s #say yes to all
  1. Now you are done setting up developing environment.
  2. Open the roundup folder in VScode.
  3. Any new changes are only to be done in demo directory.
  4. git is initialized to track origin in demo directory (for windows check if .git folder is copied to the demo)

Running the Test Suite

Requirements

Installation Instructions

Enable the python virtual environment then proceed to install the following packages

   python -m pip install selenium geckodriver

To run the code in a Headless Environment:

Set

HEADLESS = TRUE

at line 12.

To run the code without Headless:

Set

HEADLESS = FALSE

at line 12.

Run the test suite

python test_classhelper.py