raise editorial quality gate and revise 2018 spring
Build and deploy / deploy (push) Successful in 15s
Build and deploy / deploy (push) Successful in 15s
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 900" role="img" aria-labelledby="title desc">
|
||||
<title id="title">Контракт Ajax-формы в legacy jQuery</title>
|
||||
<desc id="desc">Диаграмма показывает состояния формы: готова, запрос отправлен, успешный или ошибочный ответ, затем обязательное освобождение интерфейса в обработчике always.</desc>
|
||||
<defs>
|
||||
<style>
|
||||
.bg { fill: #fffdfa; }
|
||||
.title { fill: #1e252d; font: 700 39px Arial, sans-serif; }
|
||||
.sub { fill: #64707d; font: 25px Arial, sans-serif; }
|
||||
.state { stroke-width: 3; }
|
||||
.idle { fill: #eef3fa; stroke: #355c9a; }
|
||||
.request { fill: #fff4e8; stroke: #b4432a; }
|
||||
.success { fill: #e5f2ed; stroke: #216869; }
|
||||
.failure { fill: #f9eceb; stroke: #a43228; }
|
||||
.final { fill: #f3f6f9; stroke: #64707d; }
|
||||
.state-title { fill: #1e252d; font: 700 30px Arial, sans-serif; text-anchor: middle; }
|
||||
.state-copy { fill: #44515d; font: 23px Arial, sans-serif; text-anchor: middle; }
|
||||
.code { fill: #18385d; font: 700 18px "Courier New", monospace; text-anchor: middle; }
|
||||
.arrow { fill: none; stroke: #64707d; stroke-width: 6; marker-end: url(#arrow); }
|
||||
.safe { fill: #65492e; font: 700 26px Arial, sans-serif; text-anchor: middle; }
|
||||
</style>
|
||||
<marker id="arrow" markerWidth="14" markerHeight="14" refX="11" refY="7" orient="auto">
|
||||
<path d="M0,0 L14,7 L0,14 z" fill="#64707d"/>
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<rect class="bg" width="1200" height="900"/>
|
||||
<text class="title" x="65" y="72">Ajax-форма: интерфейс возвращается</text>
|
||||
<text class="title" x="65" y="115">в готовое состояние</text>
|
||||
<text class="sub" x="65" y="158">Клиентский флаг убирает повторный submit в текущем DOM, а always освобождает кнопку.</text>
|
||||
|
||||
<rect class="state idle" x="75" y="235" width="235" height="150" rx="25"/>
|
||||
<text class="state-title" x="192" y="286">1. Готова</text>
|
||||
<text class="state-copy" x="192" y="327">Кнопка доступна,</text>
|
||||
<text class="state-copy" x="192" y="358">запроса нет.</text>
|
||||
|
||||
<path class="arrow" d="M310 310 H410"/>
|
||||
|
||||
<rect class="state request" x="410" y="215" width="380" height="190" rx="25"/>
|
||||
<text class="state-title" x="600" y="267">2. submit</text>
|
||||
<text class="code" x="600" y="302">data('request')</text>
|
||||
<text class="code" x="600" y="329">+ prop('disabled')</text>
|
||||
<text class="state-copy" x="600" y="367">Один jqXHR хранится на форме.</text>
|
||||
<text class="state-copy" x="600" y="393">Повторный submit выходит сразу.</text>
|
||||
|
||||
<path class="arrow" d="M790 310 H885"/>
|
||||
|
||||
<rect class="state final" x="885" y="235" width="240" height="150" rx="25"/>
|
||||
<text class="state-title" x="1005" y="286">3. jqXHR</text>
|
||||
<text class="state-copy" x="1005" y="327">Серверный ответ</text>
|
||||
<text class="state-copy" x="1005" y="358">или ошибка сети.</text>
|
||||
|
||||
<path class="arrow" d="M1005 385 V500 H795"/>
|
||||
<path class="arrow" d="M1005 385 V500 H405"/>
|
||||
|
||||
<rect class="state success" x="625" y="535" width="340" height="155" rx="25"/>
|
||||
<text class="state-title" x="795" y="584">4a. done</text>
|
||||
<text class="state-copy" x="795" y="625">Показать подтверждённый</text>
|
||||
<text class="state-copy" x="795" y="656">результат сервера.</text>
|
||||
|
||||
<rect class="state failure" x="235" y="535" width="340" height="155" rx="25"/>
|
||||
<text class="state-title" x="405" y="584">4b. fail</text>
|
||||
<text class="state-copy" x="405" y="625">Показать ошибку и не</text>
|
||||
<text class="state-copy" x="405" y="656">считать отправку успехом.</text>
|
||||
|
||||
<path class="arrow" d="M405 690 V758 H600"/>
|
||||
<path class="arrow" d="M795 690 V758 H600"/>
|
||||
|
||||
<rect class="state final" x="415" y="780" width="370" height="75" rx="20"/>
|
||||
<text class="code" x="600" y="816">always: removeData</text>
|
||||
<text class="code" x="600" y="841">+ disabled(false)</text>
|
||||
|
||||
<text class="safe" x="600" y="885">Ограничение: клиент не заменяет серверную защиту от повторной операции.</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
Reference in New Issue
Block a user