$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What I learned from using Svelte for the demos
Search
Niklas Kiefer
March 17, 2020
Programming
1
220
What I learned from using Svelte for the demos
Modeling Lightning Talk ⚡️
Niklas Kiefer
March 17, 2020
Tweet
Share
More Decks by Niklas Kiefer
See All by Niklas Kiefer
Optimizing tidy: Practical Insights with the React Compiler
pinussilvestrus
0
7
a11y testing: tech talk
pinussilvestrus
0
4
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
41
a11y testing
pinussilvestrus
0
83
Taking Templates to the Limit
pinussilvestrus
0
47
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
64
Automatic a11y testing with axe
pinussilvestrus
0
32
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
19
How to break down
pinussilvestrus
0
47
Other Decks in Programming
See All in Programming
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
380
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
tparseでgo testの出力を見やすくする
utgwkk
1
120
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
290
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.9k
All(?) About Point Sets
hole
0
260
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
320
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
220
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
110
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
470
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
11k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Building an army of robots
kneath
306
46k
Faster Mobile Websites
deanohume
310
31k
GraphQLとの向き合い方2022年版
quramy
49
14k
RailsConf 2023
tenderlove
30
1.3k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Context Engineering - Making Every Token Count
addyosmani
9
450
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.1k
Building Adaptive Systems
keathley
44
2.9k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Thoughts on Productivity
jonyablonski
73
5k
What's in a price? How to price your products and services
michaelherold
246
12k
Transcript
What I learned from using Svelte for the demos Modeling
Lightning Talk ⚡ Niklas Kiefer
2 Background: DRD Edit Demo
3 Background: DRD Edit Demo
4 New: Navigation + Table Layout Demo
5 New: Navigation + Table Layout Demo
6
7 Lessons Learned (1) Reactivity is - Part 1 <script>
export let view; export let activeView; </script> <div class="wrapper" style="display: {view === activeView ? 'block' : 'none'}"> {#if view === activeView} <slot/> {/if} </div>
8 Lessons Learned (2) Reactivity is - Part 2 <script>
export let tableData = {}; const HIT_POLICIES = [ /* ... */ ]; $: explanation = find( HIT_POLICIES, hp => hp.name === tableData.hitPolicy ).explanation; function changeHitPolicy(event) { const { target: { value } } = event; tableData.hitPolicy = value; } </script> <select on:change={changeHitPolicy}> {#each HIT_POLICIES as { name }} <option selected={name === tableData.hitPolicy}> {name} </option> {/each} </select> <p class="hp-explanation">{explanation}</p>
9 Lessons Learned (3) Component Templating <script> import Table from
'../../../decision-table-layout/src/components/Table.svelte'; import ArrowExpandSvg from '../../resources/arrow-expand.svg'; import './NavigationTable.scss'; const noop = () => {}; export let onViewSwitch = noop; export let tableData; </script> <div class="navigation-table"> <div class="buttons"> <span class="arrow-expand btn btn-sticky" on:click={() => onViewSwitch('split-screen')}> {@html ArrowExpandSvg} </span> <button class="edit-drd btn" on:click={() => onViewSwitch('drd')}> Edit DRD </button> </div> <Table { tableData } /> </div>
10 Lessons Learned (4) Global State <script> import data from
'../resources/data.js'; let currentTable = data['Decision_03absfl']; let view = 'drd'; </script> <Wrapper view="drd" activeView={view}> <DRD decision={currentTable.id} /> </Wrapper> <Wrapper view="split-screen" activeView={view}> <SplitScreen tableData={currentTable} /> </Wrapper>
11 Lessons Learned (5) Local Styles are equally good
12 Lessons Learned (6) Performance measures DRD Editing Demo Navigation
Demo
13 Summary Reactivity + State Management makes it way easier
to build quick demos with Svelte
Thank you