Commit Graph

74 Commits

Author SHA1 Message Date
Lutetium-Vanadium
6dbc00bbbd Added smallvec feature for inlining single completions 2021-06-27 17:26:04 +05:30
Lutetium-Vanadium
80e6d993b3 remove unnecessary ahash feature 2021-06-27 16:57:38 +05:30
Lutetium-Vanadium
08353945e5 Make Plugin::ask take self instead of &mut self 2021-06-27 16:51:05 +05:30
Lutetium-Vanadium
893037fbfe added tests for password 2021-06-24 17:05:03 +05:30
Lutetium-Vanadium
43eb1531cd added tests for input 2021-06-24 16:28:28 +05:30
Lutetium-Vanadium
d8905971cd added tests for int & float 2021-06-23 19:27:43 +05:30
Lutetium-Vanadium
bffe9505e6 Fix reversed foreground to use Color::Black if it is Color::Reset 2021-06-23 19:22:54 +05:30
Lutetium-Vanadium
34351e420f added expand tests 2021-06-22 18:14:40 +05:30
Lutetium-Vanadium
9582a69c04 rustfmt 2021-06-22 17:12:12 +05:30
Lutetium-Vanadium
5970c13f89 added tests for confirm 2021-06-21 19:52:47 +05:30
Lutetium-Vanadium
3123937e14 added tests for checkbox
Also made every event type required by generic over any Iterator
2021-06-20 20:46:12 +05:30
Lutetium-Vanadium
08d2e1649b Use central snapshot folder for each package 2021-06-19 14:25:15 +05:30
Lutetium-Vanadium
270b9be936 remove attribute and colour spilling to new lines while printing in TestBackend 2021-06-16 17:57:20 +05:30
Lutetium-Vanadium
1c22cdfd9e improved attribute handling 2021-06-16 17:50:41 +05:30
Lutetium-Vanadium
e60c8794b2 Change snapshot directory to be separate for crossterm and termion 2021-06-16 17:22:45 +05:30
Lutetium-Vanadium
5321c82456 Make TestBackend render everything instead of asserting correct ops
If the same characters are written through 2 writes instead of 1, the
previous version would error. This version however would not, which
makes more sense since what the user sees is the same.

Tests also now use `insta` for snapshots of the view which is more
manageable then having hard-coded values there.
2021-06-15 18:15:38 +05:30
Lutetium-Vanadium
6cf5d589a9 test ui::Input 2021-06-14 18:01:09 +05:30
Lutetium-Vanadium
00119f7a36 make things generic over Iterator instead of taking the Events struct directly 2021-06-14 14:26:46 +05:30
Lutetium-Vanadium
38d3229cb2 rename set_cursor -> move_cursor_to and get_cursor -> get_cursor_pos 2021-06-14 14:15:03 +05:30
Lutetium-Vanadium
2a2d6f2be7 remove extra visibility 2021-06-13 18:42:24 +05:30
Lutetium-Vanadium
c59b58b87c Change module structure in discourse-ui
Moved style related things from `backend` to `style`
Moved `Layout` and `RenderRegion` to `layout`
2021-06-13 18:29:56 +05:30
Lutetium-Vanadium
1de9f8670b Fix height issue
The height of a widget may depend on the layout. But the layout is
affected by the previously rendered widgets. For example, the `Select`
widget adds 1 to the height if the line_offset is more than 1, since it
needs to go to the next line, but if it is given a layout that has
line_offset 0, during height(), and with line_offset > 0 during render,
this may cause issues when rendering at the end of the screen.

So now height() requires layout to be edited similar to render()
2021-06-10 18:00:51 +05:30
Lutetium-Vanadium
e03d4b87e1 fix typo in Layout::with_cursor_pos and added more tests for Prompt 2021-06-09 20:58:51 +05:30
Lutetium-Vanadium
439a3341df use Page{Up,Down}, Up and Down to change value in number prompts 2021-06-09 20:04:16 +05:30
Lutetium-Vanadium
9bd68eaca6 fix ui::widgets::Prompt tests 2021-06-09 18:32:32 +05:30
Lutetium-Vanadium
4d24822706 Prompt error type is Widget instead of just display 2021-06-09 18:10:56 +05:30
Lutetium-Vanadium
d9387ab2d8 added Prompt widget and removed prompt rendering from ui::Input 2021-06-09 17:32:42 +05:30
Lutetium-Vanadium
1da8dc165a made all widget methods required 2021-06-04 20:31:23 +05:30
Lutetium-Vanadium
38104129ba add tests for discourse-ui 2021-06-04 20:17:22 +05:30
Lutetium-Vanadium
37489944a7 added auto_complete for input 2021-05-29 14:52:37 +05:30
Lutetium-Vanadium
20b2c31632 rename to discourse 2021-05-27 21:15:50 +05:30
Lutetium-Vanadium
2d3c4e2f62 fix examples/input.js 2021-05-27 20:21:03 +05:30
Lutetium-Vanadium
ac1c3841e8 make styled generic over T: Display 2021-05-27 20:10:40 +05:30
Lutetium-Vanadium
bfdec90101 improve function trait choices 2021-05-27 19:47:44 +05:30
Lutetium-Vanadium
318c1ff194 combine lifetime parameters 2021-05-27 14:27:23 +05:30
Lutetium-Vanadium
c97c3652c2 allow for limited rendering of multiline text and improved paging 2021-05-25 20:02:43 +05:30
Lutetium-Vanadium
6dd7007033 remove async 2021-05-25 17:27:51 +05:30
Lutetium-Vanadium
4ef903934b fix async examples 2021-05-24 19:59:40 +05:30
Lutetium-Vanadium
40689dd0ae added examples 2021-05-24 19:49:56 +05:30
Lutetium-Vanadium
3d3295a420 rustfmt 2021-05-23 16:56:32 +05:30
Lutetium-Vanadium
60c4a657ba renamed list to select and rawlist to raw_select
Also changed macro to use upper camel case for question type.
2021-05-21 21:13:53 +05:30
Lutetium-Vanadium
6025a4abae remove anes and add github workflows 2021-05-21 20:12:38 +05:30
Lutetium-Vanadium
3aa035a2e4 allow multiline strings 2021-05-20 21:10:08 +05:30
Lutetium-Vanadium
fcebe0fe41 allow overflow in line for StringInput 2021-05-17 19:43:35 +05:30
Lutetium-Vanadium
27555146b7 disable raw mode even during panic, remove exit handler, and delete movement bounds check 2021-05-16 14:40:19 +05:30
Lutetium-Vanadium
a32b50bd5d fix allowing default option in checkbox and add tests for missing required options 2021-05-12 15:28:58 +05:30
Lutetium-Vanadium
44ff424c0e default to vec for questions, but allow array 2021-05-12 14:45:38 +05:30
Lutetium-Vanadium
0edf503811 fix msrv to include async features 2021-05-12 14:22:51 +05:30
Lutetium-Vanadium
e197bffc50 support rust versions before 1.51 2021-05-11 19:53:02 +05:30
Lutetium-Vanadium
2cc107cffe added questions and prompt_module macros 2021-05-11 18:18:59 +05:30