Commit Graph

900 Commits

Author SHA1 Message Date
wattroll
aecbabf3d3 Language menu (#48)
* refactor(Toolbar): change the way z-order of elements is expressed

**Before:**
`.toolbar` was placed over the content of `#toolbar-wrapper`.

**After:**
`.toolbar-panels` are placed behind the content of `#toolbar-wrapper`.

**Reason:**
allows descendants of `.toolbar` to place themselves behind it.

Context
-------

Previously we had the following setup
(`*` means the root of stacking context, `-` means normal child):

    * div#toolbar-wrapper { z-index: 10, position: fixed }
       * div.toolbar { z-index: 10, position: relative }
         - div.toolbar-tabs
           - div.toolbar-tab
           - div.toolbar-tab
           - div.toolbar-tab
       * div.toolbar-panels { position: fixed }
    * div.map-wrapper { position: fixed }
    * div.cover-container { z-index: 501, position: absolute }

That was achivieving what was necessary:
- `#toolbar-wrapper` tree is placed over the `.map-wrapper`,
- `.cover-container` tree is placed over the `#toolbar-wrapper`,
- `.toolbar` tree is placed over `.toolbar-panels`

Problem
-------

The practical problem with it was not being able to make descendants
of `.toolbar` go behind it when sliding away (as they were within
`.toolbar`'s own stacking context).

We needed to add a small language menu which would be positioned next
to the button that opens it, and slide away behind the toolbar like
other toolbar-panels.

Solution
--------

I changed the stacking to be the following:

    * div#toolbar-wrapper { z-index: 10, position: fixed }
       - div.toolbar
         - div.toolbar-tabs
           - div.toolbar-tab
           - div.toolbar-tab
           - div.toolbar-tab
       * div.toolbar-panels { z-index: -1, position: fixed }
    * div.map-wrapper { position: fixed }
    * div.cover-container { z-index: 501, position: absolute }

This explicitly places `.toolbar-panels` behind everything else within
the stacking context created by `#toolbar-wrapper`.

Outcome
-------

Now `.language-menu` can easily be added as:

    * div#toolbar-wrapper { z-index: 10, position: fixed }
       - div.toolbar
         - div.toolbar-tabs
           - div.toolbar-tab
           - div.toolbar-tab { position: relative }
             * div.language-menu { z-index: -1, position: absolute }
           - div.toolbar-tab
       * div.toolbar-panels { z-index: -1, position: fixed }

* feat(Toolbar): add language menu (button and a sliding out panel)
2022-04-13 10:22:09 +01:00
wattroll
0d1968a110 Pickup user's preferred language from navigator.languages (#30)
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Co-authored-by: msramalho <19508417+msramalho@users.noreply.github.com>
Co-authored-by: Felix Spöttel <1682504+fspoettel@users.noreply.github.com>
2022-04-07 14:17:30 +01:00
wattroll
f024d2195a Add LanguageSwitch component for changing app's language (#25)
Co-authored-by: msramalho <19508417+msramalho@users.noreply.github.com>
2022-04-06 22:54:42 +01:00
msramalho
4c1b220d75 fixes incorrect embed URL concatenation 2022-04-05 10:24:44 +02:00
Miguel Sozinho Ramalho
cd8690436e Merge pull request #20 from gaearon/18 2022-04-04 18:12:46 +01:00
Miguel Sozinho Ramalho
9273a34b4e Merge pull request #22 from gaearon/drag-perf 2022-04-04 17:53:55 +01:00
Miguel Sozinho Ramalho
191324f9b1 Merge pull request #19 from gaearon/fix-tabs 2022-04-04 17:51:52 +01:00
Miguel Sozinho Ramalho
5ff084e0f6 Merge pull request #18 from gaearon/fix-warnings 2022-04-04 17:51:26 +01:00
Lachlan Kermode
e61854a4ec Merge branch 'main' into fix-warnings 2022-04-03 21:24:50 -04:00
msramalho
905682d3e2 minor(changes icon to info) 2022-04-03 23:08:45 +02:00
Miguel Sozinho Ramalho
cf97f90375 Merge pull request #17 from hgrsd/feat/date-range 2022-04-03 21:59:31 +01:00
dan
22c2715473 rm import 2022-04-03 21:59:29 +01:00
Dan Abramov
23d519f5b9 Improve dragging performance 2022-04-03 21:54:57 +01:00
Dan Abramov
27636d0d24 Update to React 18 2022-04-03 21:22:14 +01:00
Dan Abramov
66ad4ddd48 Fix warning about Tab and TabPanel 2022-04-03 21:05:54 +01:00
Dan Abramov
5092a195fb Rename unsafe lifecycle methods 2022-04-03 20:53:17 +01:00
Dan Abramov
ad646a2a00 Fix invalid <rect> width error 2022-04-03 20:52:25 +01:00
Dan Abramov
c5dad0ba57 Add missing keys 2022-04-03 20:48:53 +01:00
Dan Abramov
3abac3ebad Fix DOM property name warnings 2022-04-03 20:26:43 +01:00
Dan Abramov
2398d29f5f Fix li > li DOM nesting warning 2022-04-03 20:22:01 +01:00
hgrsd
a14ad2670a feat: dynamic initial time range 2022-03-31 18:12:16 -04:00
msramalho
80e223a3b8 adding some config instructions 2022-03-29 16:43:20 +02:00
msramalho
b6046220d8 Merge branch 'main' of https://github.com/bellingcat/ukraine-timemap into main 2022-03-29 16:16:51 +02:00
msramalho
8d434ace8a updating timeline 2022-03-29 16:16:47 +02:00
Logan Williams
3f5252dd87 Merge pull request #14 from hgrsd/fix/single-tile-layer
fix(map): make sure we have only a single tile layer
2022-03-24 16:14:23 +01:00
hgrsd
7ec7e7a657 fix(map): make sure we have only a single tile layer 2022-03-24 10:55:53 -04:00
Logan Williams
46ca3b429e Merge branch 'feat/fullscreen' of github.com:fspoettel/ukraine-timemap 2022-03-24 13:06:35 +01:00
Logan Williams
347f54ebcc Change styles for satellite switcher 2022-03-24 13:05:05 +01:00
hgrsd
2d32af53a9 more accurate comment 2022-03-22 23:55:02 -04:00
hgrsd
08052fcbc4 remove superfluous initialize call 2022-03-22 23:42:20 -04:00
hgrsd
d25f320deb unit test 2022-03-22 23:17:05 -04:00
hgrsd
9b7e02ef61 add satellite overlay toggle 2022-03-22 22:57:56 -04:00
Felix Spöttel
26c8432acf feat(Toolbar): add fullscreen toggle 2022-03-22 22:03:34 +01:00
Felix Spöttel
da38cddb82 chore: extract ToolbarButton component 2022-03-22 21:21:38 +01:00
msramalho
1b30f320b5 closes #9 missing events in filter 2022-03-22 16:29:31 +01:00
Logan Williams
4a6096497b Merge branch 'main' of github.com:bellingcat/ukraine-timemap 2022-03-22 16:12:45 +01:00
Logan Williams
ca048c38cf Fix bug caused by interrupting flyTo 2022-03-22 16:10:58 +01:00
Miguel Sozinho Ramalho
b4842fb4ca Merge pull request #10 from fspoettel/feat/event-count 2022-03-22 14:27:02 +00:00
Felix Spöttel
a7990088ab feat(Timeline): add event count to title 2022-03-22 13:43:06 +01:00
msramalho
1f34cb3494 reducing images size 2022-03-22 12:35:22 +01:00
msramalho
17250c678d adjust README instructions 2022-03-22 11:55:37 +01:00
msramalho
04b7a86bc7 adds the config.js for the ukraine timemap 2022-03-22 10:30:47 +01:00
Miguel Sozinho Ramalho
4a3d43afcd Merge pull request #8 from fspoettel/fix/track-package-lock
adds package-lock.json to repo
2022-03-22 09:20:00 +00:00
Felix Spöttel
475e5e72f8 fix: track package.lock file 2022-03-21 21:52:35 +01:00
Logan Williams
137603dfaa Clean up mobile changes, fixes #5 2022-03-21 17:05:05 +01:00
msramalho
dca91ccfa0 minor updates 2022-03-21 11:05:20 +01:00
msramalho
3784712778 adds readme 2022-03-21 11:00:33 +01:00
msramalho
d0210b1ebd cleanup 2022-03-21 10:13:41 +01:00
Miguel Sozinho Ramalho
992fabca6a Merge pull request #1 from bellingcat/simple-mobile-support 2022-03-21 08:47:35 +00:00
Logan Williams
28a5f644fc Quick fixes for mobile 2022-03-20 08:16:47 +01:00